HTML link tag

<link> tag in HTML

The <link> tag is used to link external css files with html document.

In the below example we have imported a CSS file by using href, you can see the CSS file content by opening it.

Open the file by clicking the link : http://tutorialcodeplay.com/uploads/tutorial_images/style.css

Example 1 - external css file import using <link> tag

Try Yourself

Below example is similar to the above example, but in here the css properties are added using the style tag. But in the above example css styles are added in the css file and imported using <link> tag.

Example 2 - Without external css file

Try Yourself