Skip to content

Instantly share code, notes, and snippets.

@dipaish
Last active January 15, 2024 09:19
Show Gist options
  • Save dipaish/40c3aca884119cc3bd0a05f76a27343a to your computer and use it in GitHub Desktop.
Save dipaish/40c3aca884119cc3bd0a05f76a27343a to your computer and use it in GitHub Desktop.
Flex layout

Exercise 5: HTML Layout

Design a simple webpage layout using Flexbox to achieve a responsive and visually appealing structure by conducting the tasks below:

  1. Create an HTML file (exercise5.html) with the basic structure: <header>, <nav>, <main>, <aside>, and <footer>.
  2. Apply a Flexbox layout to arrange the sections efficiently.
  3. The main content should be in the <main> section, and additional content or sidebars can be in the <aside> section.
  4. Style the elements using CSS to enhance the visual presentation.
  5. Ensure the layout is responsive, adapting to different screen sizes.
  6. Update your index.html that is Exercise 5 in index.html should link to this file exercise5. Guide:Creating hyperlinks

The end result may look as below:

layout

Note: You can use your own color combination, however pay attention to the following tips for using colors on web pages:

Contrast is Key:

  • Ensure sufficient contrast between text and background.

Color Alone Isn't Enough:

  • Use additional cues (labels, icons) besides color to convey information.

Test Color Combinations:

  • Use online tools to check and ensure accessible color contrast.

Consider Color Blindness:

  • Use patterns or labels in addition to color to convey meaning.

Clear Focus Indicators:

  • Provide visible focus indicators for interactive elements.

Use Descriptive Text:

  • Include descriptive text for color-coded information.

Responsive Design:

  • Ensure color choices work on various devices and screen sizes.

Accessible Charts:

  • Ensure information in charts is conveyed through multiple means, not just color.

Avoid Flashing Content:

  • Steer clear of rapidly flashing or blinking content.

User Testing Matters:

  • Test with users of diverse abilities for valuable feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment