04-CSS External

0
299

This tutorial is all about 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>

 

 

 

Readers might read also:

05-CSS Inline

07-CSS Links

 

 

Facebook Comments
(Visited 9 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here