welcome Netizen

Share Your Knowledge.It is a way to achieve immortality

Sunday, May 20, 2012

Difference between Inline style, Cascading Style Sheets and Embedded style sheet

Inline style:
Inline styles are CSS styles that are applied to one element using the style attribute. This style are applied only for this particular paragraph, this styles did not affect remaining content.
<p style="background:#ccc; color:#fff; border: solid black 1px;">

Apply style directly to the element..

Cascading Style Sheets:
By declaring cascading style its gives the consistency look to your page. For an example, In your page, if you are using H4 element in many Here you simply declare that all H4 headlines are blue color. Put the following code in the <head> of your HTML. All the h4 tag content are display in blue color.
<style type="text/css">
 h4 { color: #0000ff; }

Embedded style sheet:
By applying embeded style look your page become more standard. Its easy way to handle the css in separate file with the extension .css. Once you created such file, then you can easily link the file with your general page contains only html tag.
This you can save separately css file and link the file to the code..
<link rel="stylesheet" type="text/css" href="mystyle.css" />


Post a Comment