How to link CSS to HTML - Linking CSS Stylesheet

How to link CSS to HTML - Linking CSS Stylesheet

ยท

1 min read

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!

ย