5.2 Student Activity
Student Activity:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS Lesson 1</title> <style> /* Internal CSS */ h1 { color: red; } .content { color: green; background-color: lightgray; } </style> </head> <body> <h1>Welcome to CSS Basics</h1> <p class="content">This is a paragraph styled with internal CSS.</p> <p id="info">More content styled with an ID selector.</p> </body> </html><p style="color: blue;">This text is styled using inline CSS.</p>body { background-color: #f0f0f0; } p { font-size: 18px; color: navy; }<link rel="stylesheet" href="styles.css">h1 { color: #ff0000; /* HEX */ }
Challenge: Student Activity: Applying CSS Styling with Basic and Advanced Selectors
Step 1: Create the HTML File
Step 2: Create the External CSS File
Step 3: Explanation of CSS Techniques Used
Step 4: Test and View the HTML Page
Key CSS Features Demonstrated:
Last updated