internal style sheet

Qu.) What is CSS? Explain inline and embedded CSS.

Posted on

Ans.)   CSS stands for Cascading Style Sheets

 

Styles define how to display HTML elements

Styles were added to HTML 4.0 to solve a problem

External Style Sheetscan save a lot of work

External Style Sheets are stored in CSS files

 

 

Inline Styles

An inline style loses many of the advantages of style sheets by mixing content with presentation. Use this method sparingly.

To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph:

 

<p style=”color:sienna;margin-left:20px”>This is a paragraph.</p>

 

 

Internal or Embedded Style Sheet

An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the <style> tag, like this:

<head> <style> hr {color:sienna;} p {margin-left:20px;} body {background-image:url(“images/back40.gif”);} </style> </head>

 

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

Advertisements