External links not working? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

External links not working?

I am trying to work with html and css using external links. I've looked at my code and it looks right but the paragraphs will not come out with a gray background. not sure what I'm doing wrong.

13th Apr 2017, 10:48 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar
8 Answers
+ 3
are you sure the syntax and everything is correct? like : <link rel="stylesheet" href="style.css" />
13th Apr 2017, 10:50 PM
Welliton Malta
Welliton Malta - avatar
+ 1
I have this written: <LINK REL="stylesheet" HREF="example.css"/> This is in my head section
13th Apr 2017, 10:52 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar
+ 1
Could be a directory issue, try adding ../example.css if your css directory is up one..
13th Apr 2017, 10:54 PM
Jake Gliddon
+ 1
HTML code: <HTML> <HEAD> <LINK REL="stylesheet" HREF="example.css"/> </HEAD> <P>This is my first paragraph.</P> <P>This is my second paragraph.</P> </BODY> </HTML> CSS syntax: P { color: white; background-color: gray; }
13th Apr 2017, 10:55 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar
+ 1
My css file is in the same folder as my html Sorry. on my laptop I do have an opening body tag
13th Apr 2017, 10:56 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar
0
So uppercase html code is a no go? Thank you for the tip. I also posted the css code I was given to use.
13th Apr 2017, 10:58 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar
0
Made all of the p's lowercase in html and css and still isn't coming out right lol
13th Apr 2017, 11:00 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar
0
I did lol I checked and even changed the file name and the name in the code. Did not work. tried adding the type attribute and didn't work either. How did you enter the code into the playground?
13th Apr 2017, 11:03 PM
Brandon Keith McFadden
Brandon Keith McFadden - avatar