CSS embedded in HTML - CSS style definition - Guide to HTML, XHTML Guide

Change Font Size: / / Directory List

17. Embedded in HTML CSS - CSS style definition

17.1. HTML style labels
17.2. HTML link labels
17.2.1 HTML rel attribute
17.2.2 HTML rev attribute
17.2.3 HTML alternate attribute value
17.2.4 HTML start next prev attribute value

CSS: Cascading Style Sheets (Cascading Style Sheets)

There are three ways in the pages can be embedded in XHTML CSS. See CSS Guide.

Tags in the head in a CSS file loading

Example

  <head> <link Rel = "stylesheet" type = "text/css" href = "style.css" /> </ head> 

The case of the use of the link tags.

  Abbr (font-size: 12px;). Text10pxwhite (font-size: 10px; color: # FFFFFF;) 

Style.css content

CSS write directly to the contents of the document in HTML tags in the head

Example

  "text/css" <head> <style Type => abbr (font-size: 12px;). Text10pxwhite (font-size: 10px; color: # FFFFFF;) </ style> </ head> 

The case of the use of the style tags.

The two methods is the need to (but recommend the use of a method in the CSS tutorial, I will tell you why).

Style attribute to the use of loaded labels style

Example

  <p Style = "font-size: 12px;color: #000;" /> use css </ p> 

The case of the use of the label style attributes.

Extended reading

  • External quoted CSS style
  • Internal quoted CSS style
  • Quoted in the CSS style