Building my first website


#1

I am building my first website and I am having trouble linking my HTML file with my CSS file.
I am using A2 hosting and I have already written my HTML and CSS with a text editor.
When I go to put it on the website I can't figure out how to link the two together.
I know that I have to use the code in the header to link the two. The issue is that the style.css file does not show up.
What am I missing here?


#2

What does your root directory look like?

index.html
style.css

or

index.html
css >
    style.css

?

For the first, your link should look like,

<link rel="stylesheet" type="text/css" href="style.css">

and the second,

<link rel="stylesheet" type="text/css" href="css/style.css">

#3

In the head of my html document I use

<link rel="stylesheet" type="text/css" href="style.css">

#4

Load your home page (in a web browser) and right click, "Inspect Element" then click on Network and see if the style sheet is listed as having downloaded.


#5

The network box is empty


#6

This is my html code. The CSS file is located right below it. They are both in my public_html file


#7

Hey,

When you open the website eg example.com nothing is showing or only the HTML is showing ?
are you going to your domain.com/home.html ?

If you want your page to be seen when you open up the domain without adding /file.html then rename your file to index.html that automatically makes it the landing page for your website