Jump to content
jimmythearchitect

Trouble linking HTML and CSS files

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>

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Hmmm, thanks I'll try that out. I'm using Text Editor on Mac. I made sure my settings were done in such a way that it would be plain text and not rich text, but maybe there is still something wrong there. I will check. Thank you.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...