110 likes | 111 Views
Learn how to create and use CSS style sheets, including rules, selectors, declarations, and external style sheets. Ensure consistency and easily make global changes to your website.
E N D
Coding Style Sheets • Style sheets use RULES to create the style • A selector (a tag or user-defined style name) • and then declarations contained within { } and separated by ; • declarations consist of properties and values separated by a .
External Style Sheets • External style sheets (just simple text files with a .css extension) keep the rules in a separate file. They ensuree consistency in a website and making it very easy to make global changes/updates.
To access them use the <link> in the head section: • <link rel="stylesheet" href="stylesheetname.css"> • where stylesheetname.css refers to the name of your file, and an appropriate path, if needed.
Type this on your computer body { font-family: Verdana, Geneva, Arial, helvetica, sans-serif; background-color: #00FFFF; } td { font-family: Verdana, Geneva, Arial, helvetica, sans-serif; } th { font-family: Verdana, Geneva, Arial, helvetica, sans-serif; }
And this… h1 { color: #333333; } h2 { color: #666699; } h3 { color: #993399; } h6 { color: #333366; }
Add this to your stylesheet .specialfont { font-family: font-family: "Times New Roman", Times, serif; color: green }
To use special font you must • <p class="specialfont"> The text you want special </p> in your html code
Modify your style sheet body { font-family: Arial, Helvetica, sans-serif; background-color: #FF0000; }
Add a table to each of your pages • 2 columns by 2 rows • Check your web pages now
Add the following to the web pages • Page 1 Part A • Page 1 Heading 2 • Page 1 Heading 3 • Page 1 Heading 6 • Do the same for each of your pages.. • Check your web page now…