September 29, 2015

Linking an external Stye Sheet in HTML document

When linking to an external Style Sheet, you are going to reference the style sheet in your html document file. Let us see how we can link to an external style sheet in a most common way.

The style sheet can be link to the HTML document using a <link> tag and a "rel" attribute which will make the relationship with the external document linked the HTML document. And now we will have the "type" attribute which is the type of file which we will be using and that is "text/css" and finally an "href" attribute which is used for locating the path to the style sheet file.

Here is an example of how you would link an external style sheet in your HTML document.

  <head>
  <title>
  External Style Sheet
  </title>
  <link rel="stylesheet" type="text/css href="style.css">
  </head>

END...

No comments :

Post a Comment