(see also: https://websitesfromhell.net/)
"use this color and font for the first paragraph in the article; this picture for the page's background..."
style.css
)
/* in the style.css file */
h1 {
font-family: 'Helvetica';
}
<!-- in the index.html file -->
<head>
<link rel="stylesheet" href="style.css">
</head>
<head>
relation between this page and reference
no content,
no closing tag
/* A rule with many properties */
h1 {
font-family: 'Helvetica';
color: white;
background-color: #333; /*dark gray*/
}
selector: apply to all <h1> elements
font-family
: the "font"
font-size
: the size of the text
font-weight
: boldness
color
: text color
background-color
: element's background
padding
: the space around an element
<!-- HTML -->
<p>This text has <i>emphasis!</i></p>
/* CSS */
em {
font-style: normal;
text-decoration: underline;
}
why is this italicized?
change what emphatic text looks like
HTML describes the meaning, not what it looks like!
<!-- HTML -->
<p>This text has <em>emphasis!</em></p>
says nothing about appearance!