Create a new CSS file and link it to your document
General Styling
Create a global box sizing that uses box-sizing: border-box
Remove the default margin from the <body> element
Set it to 0 or 0px (both means the same)
Change the fonts of your document
Define a default font for your document
Define a different font for all heading elements
Specific Styling
Specific Styling should be based on classes
Add a padding to the header and main element within the body
Use a padding value that looks good to you but use at least 16px
Style the overall header (the one in the body) of the document like this
Align the text in the center using text-align: center
Use a background-color for the header
Use a padding within the header to create more room for the document title
Hints
You can use Google Fonts to load external fonts into your document.
Use general selectors (like the tag or universal selector) for general styling (i.e. all headings should use this font) and use classes for more specific styling.
General Styling
box-sizing: border-box
<body>
element0
or0px
(both means the same)Specific Styling
padding
to the header and main element within the body16px
text-align: center
background-color
for the headerpadding
within the header to create more room for the document titleHints
You can use Google Fonts to load external fonts into your document.
Use general selectors (like the tag or universal selector) for general styling (i.e. all headings should use this font) and use classes for more specific styling.
You can use pre defined CSS colors i.e.
salmon
,hotpink
orlemonchiffon
. Other colors can be found [here])https://htmlcolorcodes.com/color-names/).A selector list can help you to change styles for a list of elements.
Bonus
Use the two value padding shorthand to use different values for vertical and horizontal padding.
The content gets hard to read when the screen is too wide. You can use a
max-width
for the main element and center it using the margin.Example Solution and Comparison