What are the two main reasons for separating your form/formatting (CSS) from your functional content/structure (HTML):
1. You can apply the same formatting to several HTML elements without rewriting code (e.g.style=”color:red”:) over and over.
2. You can apply similar appearance and formatting to several HTML pages from a single CSS file.
If you want to write your CSS in the same document as your HTML, place it in the < head> < /head> between _____ tags.
< style> < /style>
1 Set up a < link> tag in the head.
What does the following tag do?
< link type=”text/css”; rel=”stylesheet”; href=”stylesheet.css”>
Links to a CSS file in an HTML document.
Example: font-family, color, font-size
Ex: red
Property-value pairs should always end in a ____ (_)
semi-colon ;
Example:
color: green;
What does a comment in CSS look like?
/* Comments in CSS are helpful for organization */
Font values can be set in pixels ( px ) or ___.
ems
Ex - font-size: 1em;
The font-size unit ___ is a relative measure: _____ is equal to the default font size on whatever screen the user is using. That makes it great for smartphone screens.
ems
1em
How do you create a “box” or container in CSS?
Select div & set property-value pairs for background-color, height, and width.