Horje

How to create HTML <link> href Attribute

Link to an external stylesheet.

Definition and Usage

The href attribute specifies the location (URL) of the external resource (most often a style sheet file).


Browser Support

Syntax

<link href="URL">

Attribute Values

Value Description
URL The URL of the linked resource/document.

Possible values:

  • An absolute URL - points to another web site (like href="http://www.example.com/theme.css")
  • A relative URL - points to a file within a web site (like href="/themes/theme.css")
index.html
Example: HTML
<link rel="stylesheet" href="https://www.w3schools.com/tags/styles.css">

Output should be:

How to create HTML <link> href Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin