Set Relationship Between Current Document and Linked Document in HTML



Use the rel attribute to see the relationship between the current document and the linked document. It works for <a>, <area>, <link> HTML elements. 

Example

You can try to run the following code to implement rel attribute. The example sets the CSS files −

<!DOCTYPE html>
<html>
   <head>
      <link rel = "stylesheet" href = "style.css">
   </head>
   <body>
      <h1>Heading</h1>
      <p>This is demo content.</p>
   </body>
</html>
Updated on: 2020-03-03T11:04:19+05:30

194 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements