FAQ: Languages for Web Development - Applying CSS

This community-built FAQ covers the “Applying CSS” exercise from the lesson “Languages for Web Development”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Code Foundations

FAQs on the exercise Applying CSS

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

In the index.html file at the very end of the code there are 2 red notification regarding </DOCTYPE!>

  • Its must be in lowercase
  • Its must be paired, no start tag

Yet when reviewing the codes of my earlier lessons on HTML I notice neither have been the case.
The DOCTYPE is always written in capitals and there is actually never a closing tag at the end.
So what going on in this particular code and what is the correct solution to fixing the code ? :smiley:

where it says:

On line 6 of index.html , copy and paste the code below to apply the CSS file to the existing HTML.

I’ve tried pasting:

on line 6 before and after" .header{"

No luck. I hit solution and the page changes on the right but the text editor doesn’t at all on line 6

And consistently "Get Help/Solution/Get Code Solution doesn’t return anything other than the original unsolved page. I’ve tried to just keep moving on but not sure why this doesn’t work.

4 Likes

Hi Aurlander,

 I am having the same experience...was there ever a solution?

The code to copy and paste is,

<link rel="stylesheet" href="style.css">

It should be pasted into the HTML document, not the stylesheet. Switch tabs to index.html and paste that on line 6, then Run.


As a complete aside, relating to the earlier question with respect to DOCTYPE, first, it is not an HTML tag, but an SGML tag, being as it is not written inside the <html></html> element. Second, it is not case sensitive so may be written in either lower or upper case.

<!doctype html>
<!DOCTYPE HTML>
<!DOCTYPE html>
<!doctype HTML>

The third one in the list is most typical, but all four are valid and work exactly the same.

Hi Roy,

Thanks very much for taking the time to reply…very useful information. Mike Logan