Skip to content
Related Articles

Related Articles

How to define the relationship between a document and the external resources?
  • Last Updated : 26 Jun, 2020

In this article, we learn how to create the relationship between a document and the external resources by using the <link> Element. This tag is used to define a link between a document and an external resource. The link tag is used to link to external style sheets. This element can appear multiple times but it goes only in the head section.
The link element is empty, it contains attributes only.

Syntax:

 <link rel="stylesheet" type="text/css" href="styles.css">

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
  
<head
    <title>Define the relationship between a 
        document and the external resources
</title
    <link rel="stylesheet"
        type="text/css"
        href="styles.css"
</head
  
<body
  
    <h1>GeeksforGeeks</h1
    <h2>HTML5: How to define the relationship 
between a document and the external resources?
</h2
  
</body
  
</html

chevron_right


CSS Code:

filter_none

edit
close

play_arrow

link
brightness_4
code

h1 {
    color: green;
}
  
h1, h2{
    text-align: center;
}

chevron_right


Output:

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

full-stack-img




My Personal Notes arrow_drop_up
Recommended Articles
Page :