/*===== Our first external CSS stylesheet! by: Sharon Tuttle last modified: 2016-02-12 =====*/ legend { color: red; text-align: center; font-family: "serif"; } /* you can group selectors into a single rule by separating them with commas */ h1, h2, h3, h4, h5, h6 { color: green; } /* NOTE: there are at least 5 ways to express colors in CSS3...! * predefined color names (see p. 55) * red-green-blue color codes (e.g., rgb(255, 165, 0) ) * hex color codes (e.g., #ffa500) * two more, see the course text */ /* You can indicate that just SOME elements of type are to be styled with a particular rule by using a class selector -- * give such an element a class attribute * then put .attValue in the CSS rule selector e.g., <p class="right"> */ p.right { text-align: right; } /* you can even have a rule for ALL elements with a particular class attribute value ...the following rule applies to ANY element with class="center" */ .center { text-align: center; } /* there is also a way to write rules for elements with particular attributes -- CSS attribute selectors element[attrib="attValue"] */ input[type="text"] { background-color: yellow; } input[type="submit"] { color: blue; }