The External Style Sheet
An external style sheet is a text file that must have the extension .css
eg) "mystylesheet.css"
The HTML page using the style sheet must link to the style sheet with a link written
between <head>and </head>
<link rel="stylesheet" type="text/css" href="mystylesheet.css" />
where href is the path to the style sheet. So, if you put the style sheet in the folder css
the path is href="css/mystylesheet.css"
The Embedded Style Sheet
CSS can also be embedded on the same page as the html
The styles must be between <head> and </head>
and between
<style type= "txt/css" >
</style>
In-line styles
CSS can also be written "in-line" in between the <body> and </body>
<div style=" width:960px; height:100px; background-color:silver;">
CSS Priority ---The Order of Interpretation
#1 Priority is the Browser's default value...
#2 The External Style sheet
#3 The embedded Style Sheet
#4 The in-line styles
Remember, you can style ANY html element
selector {property: value;}
Where:
- The selector is:
- *, Universal, applies to all elements
- Any element
- A class
- An ID
- An html5 semantic
Updated the links to W3C's Validation services
Tidy
If you need to convert a page to Xhtml/html5 or you are having trouble getting the page to look the way you want, Tidy may help you solve your problems
Tidy, well cleans up and fixes (if it can) your your markup. The validation and tidy services listed below are built into or linked to from most web editors
There are some older on-line services, like Tidy On-line, or Page Valet, might be useful to you...
Validate
The Basics - what you should run on all your web pages
- Unicorn - W3C's Unified Validator.
- Markup Validation for HTML, XHTML, (for Tidy, click more Options)
- The Link Checker
- The CSS Validator
- The html5 Validator
The SEO page has also been updated
No comments:
Post a Comment