Home > CSS > Types of stylesheet and it’s priority level

Types of stylesheet and it’s priority level

There are three types of CSS styles:

  • inline styles
    Inline styles are styles that are written directly in the tag on the document. Inline styles affect only the tag they are applied to.

    <a href="" style="text-decoration: none;">
  • embedded styles
    Embedded styles are styles that are embedded in the head of the document. Embedded styles affect only the tags on the page they are embedded in.

    <style type="text/css"> p { color: #00f; } </style>
  • external styles
             External styles are styles that are written in a separate document and then attached to various Web documents.
             External style sheets can affect any document they are attached to.
<link rel="stylesheet" type="text/css" href="styles.css" />

CSS best practices recommends that you use primarily external style sheets for styling Web pages so that you get the most benefit.

It’s priority level is followings.

Inline styles  has high priority then embedded styles and external styles has the lowest priority.

Happy styling. 😉

Advertisements
Categories: CSS Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

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: