ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

04-CSS External

In using CSS it is preferable to separate your HTML  from it because it allows the webmaster to quickly determine the content (HTML) and design (CSS).

 

External CSS is a file [.css] that contains CSS code only .

 

The <link> tag is used as a reference of CSS  in your HTML.

 

Example:

CSS File.

Open a code editor, add the following code below and save it as .css file extension.

body{
background-color: brown;
}
p {
color: red;
}
h3{
color: green;
}

 

 

HTML File.
Open a code editor, add the following code below and save it as .html file extension.

<html>
<head>
<link rel=”stylesheet” type=”text/css” href=”format.css” />
</head>
<body>
<h3> A green Header </h3>
<p> Paragraph with blue font.
Background with brown color. </p>
</body>
</html>

Facebook Comments

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked *

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!