8.2 Student Activity
Design a Blog Post Layout with Google Fonts and Text Styling
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Blog Post</title> <link href="https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Roboto:wght@400;700&display=swap" rel="stylesheet"> <style> body { font-family: 'Roboto', sans-serif; line-height: 1.6; padding: 20px; background-color: #f9f9f9; } h1 { font-family: 'Lora', serif; text-align: center; color: #333; font-size: 36px; } p { font-size: 18px; color: #666; background-color: #fff; padding: 10px; border-left: 4px solid #ccc; } a { color: #3498db; text-decoration: underline; } a:hover { text-decoration: none; color: #2c3e50; } </style> </head> <body> <h1>Understanding CSS Typography</h1> <p>Typography plays a crucial role in web design. It affects the readability and overall aesthetics of a web page.</p> <p><a href="#">Learn more about typography</a></p> </body> </html>
Last updated