Wednesday, November 22, 2017

Using External CSS


First we should know that, why we should use a CSS file in External way. When we create a web page, the code of the page wants to be clear to the developer. We should decrease the complexity of the code. If our code is made up without complexity, it will be easy to detect and debaug the issues of the web page.
With an external style sheet, you can change the look of an entire website by changing just one file.
Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the <head> section:

Follow the code given below, 

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

To, try the following code, you should create a separate CSS file.

I have mentioned that, how to create a CSS file, in my previous post. So, by using the knowledge of it, you continue the code given above.
<Link> tag, gives an platform to include the link of CSS file. As follows "type" will indicate the type of the code and "href" will shows the CSS file name.


No comments:

Post a Comment

Why We Need Web Sites Imagine you are a web designer. You are meeting some people after long time, may be your friends or relations. Whe...