Inline and Embedded CSS

Ask us questions about web development here (PHP/MySQL/XHTML/CSS/JavaScript/AJAX)
Forum rules
Be civilized... # Seja civilizado... # Être civilisé...

Inline and Embedded CSS

Postby sharon100 » Wed Apr 29, 2009 10:47 am

Inline Styles
An inline style rule is coded directly into an HTML tag within the flow of your source code, just as an HTML attribute is used. The purpose of inline styles is to allow you to override an embedded or linked style rule, or to make a quick change of style where you don't want a reusable rule. For example, you may have a rule that specifies H1 headings should be the color blue. If you have a place on your page where you want an H1 heading in red, an inline style rule allows you to override an embedded or external style rule. To override an embedded or linked style, an inline style must be coded into each HTML element each time you want to override the embedded or linked style.
Embedded Styles
Embedded styles are set in the HEAD section of your web page. Similar to an inline style rule, embedded styles allow you to override the rules of an external style sheet. The difference is that with an embedded rule, you don't have to create a rule with each use of an HTML element. An H1 heading given the color red in an embedded style rule will render the H1 heading in red every time you use it on the page without having to code the rule into each heading tag as you must do with inline rules or with HTML attributes.

web development services
sharon100
 
Posts: 1
Joined: Wed Apr 29, 2009 10:36 am

Return to Web Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron