Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating Styles and Style Sheets.  CSS styles don’t communicate in nice clear English, they have their own language.  P { color: red; font-size: 1.5.

Similar presentations


Presentation on theme: "Creating Styles and Style Sheets.  CSS styles don’t communicate in nice clear English, they have their own language.  P { color: red; font-size: 1.5."— Presentation transcript:

1 Creating Styles and Style Sheets

2  CSS styles don’t communicate in nice clear English, they have their own language.  P { color: red; font-size: 1.5 em;} This code says, “make all text in all paragraphs marked with a red and 1.5 ems tall.” An em is a unit of measure that is based on a browser’s normal text size. Using an em tag as opposed to a px tag adjusts the size of text based on the size of text the user has specified for her/his computer.

3 Selector Declaration Declaration Property Value Property Value Declaration Block color: red;Font-size: 1.5em; p

4  A single style will not transform a Web page into a work of art  To infuse your web site with great design, you will need many different styles  A collection of CSS styles comprises a style sheet.  Style sheets can be one of two types— internal or external

5  External style sheets are the way to go.  Easier to build a web page  Contain all of your style information  Just one line of code to attach the sheet to your web page  Easier to edit  Help web pages open faster Downloads your style document to a user’s computer or cache

6  A collection of styles that is part of the web page’s code  Always appears between the opening and closing HTML tags in the web page’s section  EXAMPLE:  H1 { color: #FF7643; font-face: Arial;  }

7  The tag is HTML, not CSS—tells the browser that the information contained within the tags is CSS code.  Internal style sheets are easy to add to a web page  Provide immediate visual boost to your HTML  Style not the most efficient method of design  Especially if web page is comprised of many pages.  More of a hassle when you want to update the look of the site.

8  HTML:   XHTML:   The Difference?  How the tag is ended

9   @import url (css/global.css);   Unlike the tag, @import is part of the CSS language and has some definite un- HTML-like qualities.  Use url, not href  Enclose the path in parentheses

10  Chapter 2—Tutorial  Page 39 in your textbook  Then Assignment 1 in Blackboard  Don’t forget to validate both your HTML and your CSS  Upload your documents to your Assignment 01 folder on the SWS


Download ppt "Creating Styles and Style Sheets.  CSS styles don’t communicate in nice clear English, they have their own language.  P { color: red; font-size: 1.5."

Similar presentations


Ads by Google