IT. Expert System.


CSS Application

CSS Application

There are three basic ways to apply CSS styles to an HTML document. They are:

  • Inline
  • Internal
  • External


Inline styles are applied directly to the HTML by using the style attribute.

The following style sets the text color of the text in this paragraph to 'blue'.

<p style="color:blue;">text</p>

Use Inline styles sparingly and only when a single element has a unique style to be applied.


Internal styles are specified within the <head></head> tags of an HTML document and apply to the whole document. The following example would set the text color to blue for all paragraphs in the document.

  <title>CSS Inline Example</title>
  <style type="text/css">
    p {

Use Internal styles when a single page has a unique style to be applied.


External styles are specified in a separate CSS file and 'included' into HTML documents in which they are to apply.

The following code shows the contents of an example style sheet, styles.css:

p {

The following HTML code shows how to include the external style sheet named styles.css into an HTML document. Notice that the <link> tag is specified within the <head></head> tags.

  <title>CSS External Example</title>
  <link rel="stylesheet" type="text/css" href="styles.css"/>

External style sheets are recommended when the styles are to be applied across multiple HTML documents. This allows for consistency throughout an entire web site and any style changes automatically apply to all files that include the style sheet.

CSS Cascading Order

When multiple styles are specified by any of these methods, the styles 'cascade' into a single style by following this list in order of increasing priority:

  1. Browser default
  2. External style sheet
  3. Internal styles
  4. Inline style

Therefore, an Inline style has the highest priority, meaning it will override the same Internal style, or in an External style sheet, or in a browser (a default value).


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 583 / 158668101. Delta: 0.00221 с