Social Icons

Sunday, January 5, 2014

Inline style sheet

Using an inline css coding

Inline styles are added inline to existing X/HTML tags or used in conjunction with the approved HTML 4.00 span tag. The span tag is a container tag that affects all content on the page between it and the closing span tag. For example, the following syntax would place a yellow highlight behind the words Habitat for Humanity:

Habitat for Humanity

You can use inline style definitions to add style attributes to existing X/HTML tags. The following examples demonstrate this technique: css coding

The advantage of using inline styles is that you can designate a set of attributes with a single tag. This method should be used only for occasional style changes. If you plan to use the same inline style more than once in a page, you should consider defining it as a style element in an embedded style header block so you do not waste time repeating inline instructions.

A inline style attribute added directly within HTML tags.

Internal style sheet

Internal or Embedding CSS Information

The embedding method defines styles for a single page and is perhaps the simplest method for using styles. The syntax for embedding a block of style information in a single document is as follows:

style css

Wednesday, January 1, 2014

External Style Sheet

linking to style sheets from and HTML file


With the linking method, a single style sheet controls multiple web pages. However, each page must be linked to the style sheet, which is a plain text file with the .css file name extension. To link a Web site file to the style sheet, use the following syntax:

css link

Style sheet files should include only style information. HTML tags should not be included in your plain-text style sheet file.


Importing style information


Another method for accessing and external style sheet file involves using the @import statement. Using the import method allows you to apply multiple style sheets using one style element. The syntax for using the import method is as follows:

css link

Note that in this method, a semicolon is needed at the end of the @import statement to separate it from any following style information. CSS link to HTML.