HTML <link> href Attribute

The href attribute of the element is used to set the url of the external resource.

Following is the syntax ?

Above, the url is the url of the linked document. Let us now see an example to implement the href attribute of the element ?

Example






   

Demo Heading

   

This is demo text.

We have an external document above "new.css", which is linked using href. This document is a CSS style file ?

h1{
   color ? blue;
}
p{
   background-color ? red;
}

Output

This will produce the following output. We styled the heading and text in the above "new.css" ?

Updated on: 2020-06-29T08:18:07+05:30

326 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements