Presentation
Objective
- Stylesheets, cascading order, and syntax.
- Selectors, properties, values, and units.
- The box model.
1 Basics
Search for and install Visual Studio Code extensions from the marketplace (opens in a new tab) to enhance your experience.
- Experiment with multiple ways of including CSS in your HTML pages: inline, internal/embedded, and external.
You can learn more about the box model using this guide (opens in a new tab) from CSS-Tricks and this guide (opens in a new tab) from MDN Web Docs.
-
Use the W3Schools CSS tutorial (opens in a new tab) to complete the following CSS exercises (opens in a new tab):
- selectors
- background
- border
- margin
- padding
- height/width
- box model
- outline
- text
- font
- links
- lists
- combinators
- pseudo-classes
- pseudo-elements
- attribute selectors
- rounded corners
- color
Complete the CSS Diner (opens in a new tab) game to test your selector skills.
-
Use an internal stylesheet to present the provided
quantum.html
andqubit.html
pages as shown in Figure 1; do not modify the document structure of the pages.quantum.html<head> <style type="text/css"> * { box-sizing: border-box; } </style> </head>
- The icons can be downloaded from Lucide (opens in a new tab).
- The color palette is available from ColorBrewer 2.0 (opens in a new tab).
Figure 1: CSS basics
2 Extra
Complete the CSS Sundae (opens in a new tab) game to learn more about positioning.
Go through all the W3Schools tutorials (opens in a new tab) and complete all the exercises (opens in a new tab) for a thorough understanding of CSS.
Resources
- MDN: CSS (opens in a new tab), Styling the web (opens in a new tab), The box model (opens in a new tab)
- W3Schools: CSS Tutorial (opens in a new tab)
- CSS cheatsheet (opens in a new tab)
- Google: Fonts Knowledge (opens in a new tab)
- CSS Shapes (opens in a new tab), CSS Box Shadows (opens in a new tab), CSS Checkboxes (opens in a new tab), CSS 3D Buttons (opens in a new tab)
- CSS Zen Garden (opens in a new tab)
- Tools: UI Colors (opens in a new tab), ColorBox (opens in a new tab), Palette (opens in a new tab)