[an error occurred while processing this directive]

Cascading Style Sheet(CSS)

                         

Cascading Style Sheet (CSS) is known as style sheet language, define the presentation of a document written in a markup language. The application of style sheet is to style the web pages written in HTML and XHTML,but the language can be applied to be any kind of XML document, includes SVG and XUL.

Understand with Example.

The Tutorial illustrates an example from Cascading Style Sheet in HTML. In this Tutorial, the code create a stylesheet and applied it to a HTML page. For this, we  create a short CSS style sheet stored in a file "link.css". The code sets the text color of paragraph to red ,background color to lightgrey. Now we create a HTML page. Inside the HTML code, <href="link.css">,which gives you the reference of link.css file.

The code is saved .html extension. 

body {color: purple; background-color: lightgrey;}

p {color:red;}

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <<LINK href="link.css" rel="stylesheet" type="text/css">
 </HEAD>

 <BODY>
  
<h1>Cascading Style Sheet(CSS)</h1>

<p>Cascading Style Sheets (CSS) is a stylesheet language 
used to describe the presentation of a document written in a 
markup language. Its most common application is to style web 
pages written in HTML and XHTML, but the language can be applied
to any kind of XML document, including SVG and XUL.</p>

</BODY>
</HTML>

 

Place the path of your HTML code into your address bar of browser. The output is displayed as

Download

                         

[an error occurred while processing this directive]