DEV Community

Cover image for What is the correct HTML for referring to an external style sheet?
CyberBotMachines
CyberBotMachines

Posted on • Updated on <time datetime="2021-09-28T21:36:47Z" class="date-no-year">Sep 28</time>

What is the correct HTML for referring to an external style sheet?

TL;DR Summary

Here is the correct HTML for style sheet referral:
[ copy-paste and thank me later :) ]

<link href="style.css" rel="stylesheet" type="text/css" />
Enter fullscreen mode Exit fullscreen mode

Also, make sure you put this line either in the <head> or somewhere near the top of the page like this:

external style sheet code

And this is it.

And if you want to learn HTML, CSS and JS much faster check out this new learning method.

Until next time,
Will

Discussion (0)