Jump to content

Trouble linking HTML and CSS files


jimmythearchitect

Recommended Posts

I am building my first web site using HTML, CSS, and Bootstrap. After extensive searching, I can’t get my HTML file to link with my CSS file. The HTML document and CSS document are in the same domain so there shouldn’t be any reason to mention a file in the code, but my CSS isn’t affecting the HTML when I load it in Chrome. Any help would be greatly appreciated. I have enjoyed learning how to make a website, but this is hampering my progress/enjoyment.

Below is some of the code (most comes from the Bootstrap site with minor customization).

<head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><!--[if lt IE 9]><script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script><script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--> <title>TruNord</title><link href=“GOOGLE FONT PAGE” rel=“stylesheet” /><link href=“css/bootstrap.min.css” rel=“stylesheet” /><link href=“main.css” type=“text/css” rel=“stylesheet” /></head>
Link to comment
Share on other sites

It looks like you're not using a proper code editor to write your code.

 

Your code has curly quotes “”, while the code is meant to have ordinary quotes " "

  • Like 1
Link to comment
Share on other sites

CSS files are linked to the html like this:

<link rel="stylesheet" type="text/css" href="URL where is CSS file" />

rel means relationship and tells to browser what is relation between html file and css. href is HypertextReferance, which tells where to look for something.

  • Like 1
Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...