HTML 1 Week 6 Review Using Cascading Style Sheets . Most professional way of "styling" web pages . A different language, not HTML . The ONLY way to get strict validation . CSS should be validated: http://jigsaw.w3.org/css-validator/ 3 Ways to Apply CSS . Separate file (external style) . preferred method . can be attached to all pages in site . Style element in head of document (embedded style) . used when one page has to be different . much less efficient . Style property in individual element (inline style) . least efficient Syntax of CSS . body { background-color : gray; } . body - name of selector (element or class) . { - required punctuation . background-color - property . : - required punctuation . gray - value . ; - required punctuation . } - required punctuation . Spacing doesn't matter except for certain property names and values. Code Used to Include CSS . external style sheet . . goes in head of document . embedded style . . also goes in head of document . inline style .
or
. A generic class can be used with any element: . .warning {color: red;} .