Dhairya Shah
Dhairya Shah's Blog

Follow

Dhairya Shah's Blog

Follow
How to link CSS to HTML - Linking CSS Stylesheet

How to link CSS to HTML - Linking CSS Stylesheet

Dhairya Shah's photo
Dhairya Shah
ยทSep 2, 2022ยท

1 min read

Play this article

HTML is a markup language that helps create the structure of the website. Thus, CSS is what we require in order to style our website.

To use CSS styling it needs to be linked with an HTML file.

To link CSS to HTML, we need the use of a link tag with some required attributes. Here's how it will go:

<link rel="stylesheet" href="style.css">
  • rel attribute in the link tag specifies the relationship between the current document and the linked document.
  • href attribute in the link tag specifies the location of the CSS file.

Thanks for reading

Follow me on Twitter

Thanks for reading!

ย 
Share this