Skip to main content

Command Palette

Search for a command to run...

How to link CSS to HTML - Linking CSS Stylesheet

Published
•1 min read
How to link CSS to HTML - Linking CSS Stylesheet
D

I am 17 years old and a young passionate and self-taught frontend web developer and have an intention to become a successful developer. I usually write about JavaScript and Web Development and share some tips in the articles.

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!

2 views

More from this blog

D

Dhairya Shah

119 posts

How to link CSS to HTML - Linking CSS Stylesheet