Back to Unit 6

Unit 6 Website Development - Tutorial 2

2.27 Keep CSS organised into sections with comments

Make the stylesheet easier to read and improve later.

What You Are Adding

As the stylesheet grows, comments and sections help you find rules quickly. Group related rules together, such as global styles, header, navigation, cards, forms and footer.

CSS To Add To css/style.css

Add or adapt this CSS in the stylesheet you created in Tutorial 1. Keep the HTML structure from Tutorial 1 and use CSS to improve the presentation.

/* Global styles */
body {
    font-family: Arial, Helvetica, sans-serif;
}

/* Header and navigation */
nav ul {
    display: flex;
    gap: 14px;
}

/* Cards */
.club-card {
    padding: 18px;
}

Expected Output

Global stylesHeaderNavigationCardsFormsFooter

Build It Yourself

  1. Open the same unit-6-website folder from Tutorial 1.
  2. Add or update the relevant HTML class names if this page uses classes.
  3. Add the CSS shown above to css/style.css.
  4. Save the stylesheet and refresh the website in the browser.
  5. Compare your page with the expected output preview.

Common Mistakes

Success Checklist