Untitled
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Social Media App</title> <style> /* CSS for Social Media App */ body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f0f2f5; } header { background-color: #4267B2; color: white; padding: 10px 20px; text-align: center; } .container { padding: 20px; } .post { background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); margin-bottom: 20px; padding: 15px; } .post h3 { margin: 0 0 10px; } .like-button { background-color: #4267B2; color: white; border: none; padding: 10px 15px; cursor: pointer; border-radius: 5px; } .like-button:hover { background-color: #365899; } </style> </head> <body> <header> <h1>Social Media App</h1> </header> <div class="container"> <div class="post"> <h3>Post Title 1</h3> <p>This is the first post content. Share your thoughts and engage!</p> <button class="like-button" onclick="likePost(this)">Like</button> </div> <div class="post"> <h3>Post Title 2</h3> <p>This is the second post content. Let's keep the conversation going!</p> <button class="like-button" onclick="likePost(this)">Like</button> </div> </div> <script> // JavaScript for Interactivity function likePost(button) { button.textContent = 'Liked'; button.disabled = true; alert('You liked this post!'); } </script> </body> </html>
Leave a Comment