William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

CSS: Priority Scheme

Priority scheme for CSS sources (from highest to lowest priority):

  • Author styles (provided by the web page author), in the form of:
    • Inline styles, inside the HTML document, style information on a single element, specified using the “style” attribute
    • Embedded style, blocks of CSS information inside the HTML itself
    • External style sheets, i.e., a separate CSS file referenced from the document
  • User style:
    • A local CSS file the user specifies with a browser option, which acts as an override applied to all documents
  • User agent style
    • Default styles applied by the user agent, i.e., the browser’s default settings for element presentation

The style sheet with the highest priority controls the content display. Declarations not set in the highest priority source are passed on to a source of lower priority, such as the user agent style. This process is called cascading.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: