This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

266 points
5040777d89a04c00020205e4_368469822
Submitted by
Tony
almost 5 years ago

It looks like your 'type' attribute isn't quite right.

It looks like your 'type' attribute isn't quite right.
This seems to work, but I keep getting the error message in the subject line.

// Sorry, I can't figure out how this formatting works.
//
//
//

<!DOCTYPE html>
//
//
//
//
// html>
// head>
// link "text/css" rel="stylesheet" href = "stylesheet.css">
// title>Result
// /head>
// body>
// p> Test

// /body>
// /html>
Result:
It looks like your 'type' attribute isn't quite right.


0 votes

permalink

2 things: Put type= before "text/css". AND The link tag is a self closer(/>) which you seem to have accidentally overlooked.

Another note about posting code to the forum: highlight it and hit ctrl/command+k which will put it in better formatting(Just for future reference).

2094 points
6756c9a7797cbf7affe79126da187df0?s=140&d=retro
Submitted by
mckinsey2
almost 5 years ago

1 Comment

5040777d89a04c00020205e4_368469822 Tony almost 5 years ago

Thank you for the help. That was part of the solution. The problem persisted until I reset the exercise and reentered the code. Dzintars Klavins duplicated my error with the correct syntax.

Thanks for the ti on formatting. If I have another question It'll be easier to read next time.


0 votes

permalink

The same error on:

    <!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>Result</title>
    </head>
    <body>
      <p>Test</p>
    </body>
</html>

Result:
It looks like your 'type' attribute isn't quite right.

194 points
50d8b69a6b281d3b45007b12_315334613
Submitted by
Dzintars Kļaviņš
almost 5 years ago

2 Comments

5040777d89a04c00020205e4_368469822 Tony almost 5 years ago

Yes, the problem continued. I reset the exercise, reentered the code exactly as yours reads, and now have no error. The code was identical before, yet it had an error. Very perplexing.

50de12c53d353179da000eca_225719005 Connor Kim almost 5 years ago

That is weird. I get the right answer with JUST that code, but if the CSS sheet is used at all it tell you that the 'type' attribute isn't quite right. I would believe that its a bug.