web.selah-hcs.orgweb design for kids // html5 + css3one day academy
THIS WEEK'S JOB // Stop decorating tag by tag and start writing style rules that paint the whole shop at once. (Book pages 164-172 in Mrs. Gaiser's book.)
THE THREE IDEAS
Content and style, separated
HTML says what things are; CSS says how they look. Separate them and you can repaint the whole site by editing one file.
A rule has three parts
Selector (who), property (what), value (how): h1 { color: navy; }. Read it out loud: all h1 elements, make your color navy.
Three ways in, one right way
Inline styles, a style element, or a linked .css file. The linked file wins because one file paints every page.
TRY IT IN THE PAINT BOOTH
<style>
h1 { color: #ff5fa2; }
p { color: #333333; }
</style>
<h1>Painted by a rule</h1>
<p>Every paragraph obeys the same rule. Change it once, change them all.</p>