CSS - Basic: Way to use CSS Style in HTML documentsTag: css, web design Category:post: 09 Nov 2007 read: 459 In this posting, I will explain the different ways in wich you can use CSS Style in your HTML documents. There are 3 ways: Inline Styles, Embedded Styles, and External Style Sheets. Inline StylesThis is simplest method. An inline style is applied via the style attribut. You can see following example inline style:
The major disadvantage: you can not reuse them. You must define every tag (every p maybe). Embedded StylesAnother style, applying CSS styles to web pages is to use the style element. We declare any number of CSS styles by placing them betwwn the opening and closing <style> tags.
The major disadvantage: you must repeat those style definitions within style element at the top every one of your site's page. External Style SheetsIt is a external syle sheet file that contents a web site's CSS styles. We separate them from any one web page. Multiple pages can link to the same .css file, and any changes you make to this file will affect all the page that link to it. To link a document to an external style sheet (example styles.css), place a link element in the document's header:
|
| | Give Your Opinion | Recommend |
|

