It's dependent on your file structure. Conventionally, if you keep .html files in the root directory, you'd keep style files (.css) in a directory labeled css so your structure would like

/-
 - /img
 - /css
 | --- style.css
 | --- printstyle.css
 - index.html

which means your tag line would read

<link rel="stylesheet" type="text/css" media="screen" href="./css/styles.css">
<link rel="stylesheet" type="text/css" media="screen" href="./css/printstyles.css">

Please note the "./" preceding the directory name. This means it's a relative location and is needed if you're reading your .html files locally (using file:/// instead of serving them via a local server as I imagine you are).

Answer from isick on Stack Overflow
🌐
DigitalOcean
digitalocean.com › community › tutorials › html-link-tag
HTML Link Tag Syntax Reference for External CSS Files | DigitalOcean
October 12, 2020 - Remember to add this tag in the <head> section of the document: <link rel='stylesheet' href='style.css' type='text/css' media='all'>
Discussions

html - Linking to an external css file - Stack Overflow
I think the problem might lie in somewhere in the media tags try removing then and see if anything changes. ... It's dependent on your file structure. Conventionally, if you keep .html files in the root directory, you'd keep style files (.css) in a directory labeled css so your structure would like · /- - /img - /css | --- style.css | --- printstyle.css - index.html ... More on stackoverflow.com
🌐 stackoverflow.com
Linking to External CSS files
I continue to have problems with external CSS files. I’m certain there is something I don’t understand about using the link tag in HTML. I think it’s with the pathname. I’ve created test index.html and test -page.css files to try and master this lesson. More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
1
0
January 21, 2025
html - load external css file in body tag - Stack Overflow
usually, external css file loading code is put on header of html. ... ...... More on stackoverflow.com
🌐 stackoverflow.com
What's the easiest way to link HTML and CSS files for practicing?
This one is fairly easy bud, say for instance you create a folder on your desktop for shits and giggles. Name it whatever you want of course, now create your html file and your css file in that folder together, the key is they have to be in the same directory, hence the folder. Then: where href="mystyles.css" just rename what's in quotes to the path of the css file and voila. Also in case forgotten, that goes in the head of your html. More on reddit.com
🌐 r/learnprogramming
16
17
September 10, 2013
🌐
Hostinger
hostinger.com › home › tutorials › how to link css to html files in web development
How to link CSS to HTML files in web development
December 16, 2025 - To link CSS to HTML, use the <link> tag within the <head> section of your HTML document, which creates a reference to an external CSS file.
🌐
Stack Overflow
stackoverflow.com › questions › 4957446 › load-external-css-file-in-body-tag
html - load external css file in body tag - Stack Overflow
@Pacerier you can use <link rel="stylesheet" /> directly in <body> tag, cuz the stylesheet type is body-ok.
Find elsewhere
🌐
Simplilearn
simplilearn.com › home › resources › software development › how to link external css in html
How To Link External CSS in HTML | Simplilearn
December 2, 2025 - External CSS (file) is a form of CSS which is used to add styling to multiple HTML pages at a time. It helps to design the layout of many HTML web pages simultaneously. Read more!
Address   5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
Codefinity
codefinity.com › courses › v2 › 78d607b1-b967-4234-89ac-c5a6f79b0a9d › 33440663-20be-4b3f-80aa-f8d7f6160152 › 6e933371-b6ab-4cb9-aa13-dc1ffd2aa989
Learn External CSS | Getting Started with CSS
You use the <link> tag in the <head> section of your HTML document to connect an external CSS file. The most important attributes for this tag are rel and href. The rel attribute describes the relationship between the HTML and the linked file, ...
🌐
CodeSignal
codesignal.com › learn › courses › building-a-static-todo-list-with-html-css › lessons › linking-external-css-to-html
Linking External CSS to HTML
type: The type of media we are linking. For CSS, it's "text/css". href: The location of the stylesheet, that is, the path to our style.css file. Add this to the <head> section of your HTML document: If there are multiple external CSS files linked, the later ones will overwrite the rules of the previous ones.
🌐
Tiiny Host
tiiny.host › blog › link-css-to-html
How to Quickly Link CSS to HTML: Stylesheet Steps to Success – Tiiny Host Blog
May 21, 2023 - You can now clearly see where your <link> tag is nested within the <head> tag. It doesn’t matter how many tags are in the <head> section. You can add yours anywhere that isn’t part of another tag. Here, we put the <link> tag just before the </head> closing tag. The href=“styles.css” attribute denotes the name of your CSS file.
🌐
W3Schools
w3schools.com › css › css_external.asp
CSS External Stylesheet
An external style sheet is used when you want to define styles for multiple pages. ... Each HTML page must include a reference to the external style sheet file inside the <link> element, inside the head section.
🌐
DhiWise
dhiwise.com › post › how-to-link-css-to-html-the-ultimate-guide-for-web-designers
How to Link CSS to HTML: Everything You Need to Know
May 29, 2024 - To apply the styles from an external CSS file to your HTML document, you need to use the <link> element. This element is placed within the <head> section of your HTML file and is responsible for establishing the link between your HTML and CSS files.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › link
<link>: The External Resource Link element - HTML | MDN
1 week ago - The <link> HTML element specifies relationships between the current document and an external resource. This element is most commonly used to link to stylesheets, but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among ...
🌐
GeeksforGeeks
geeksforgeeks.org › css › how-to-link-external-css-to-html
How to Link External CSS to HTML? - GeeksforGeeks
The <link> element should have ... link an external CSS file to an HTML document, you need to use the <link> element within the <head> section of your HTML file....
Published   October 8, 2024
🌐
W3Schools
w3schools.com › tags › tag_link.asp
HTML link tag
The <link> tag is most often used to link to external style sheets or to add a favicon to your website.
🌐
W3Schools
w3schools.com › css › css_howto.asp
How to add CSS
<!DOCTYPE html> <html> <head> <link ... text editor, and must be saved with a .css extension. The external .css file should not contain any HTML tags....
🌐
W3Schools
w3schools.com › html › html_css.asp
HTML Styles CSS
This example uses a full URL to link to a style sheet: <link rel="stylesheet" href="https://www.w3schools.com/html/styles.css"> ... You can read more about file paths in the chapter HTML File Paths.
🌐
Mimo
mimo.org › glossary › css › linking-a-style-sheet
Linking a style sheet in CSS: Learn to Connect CSS to HTML
Master styling and layout with CSS. Learn selectors, flexbox, grid, animations, and responsive design ... To use an external style sheet in HTML, add the <link> element inside the <head> section of your HTML document. It’s a self-closing tag that requires two attributes:
🌐
Better Programming
betterprogramming.pub › link-css-and-js-files-with-html-file-f848d00b42e8
Link CSS and Js Files With an HTML File
June 29, 2019 - <link rel=¨stylesheet¨ type=¨text/css¨ href=¨[url_bootstrap_theme]¨> To link a Js file with your HTML, you only have to add the source of the script inside the body tag or outside; it doesn’t matter.