This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Meaghan Conklin
over 10 years

Help with 5/26- CSS an overview

I’m having some trouble with excercise 5/26. Below is the code I inserted and I’m not having much luck with it. Could someone explain to me what the proper code is and why?

<!DOCTYPE html>
<html>
    <head><link type="text/css" rel="stylesheet.css" 
    href="http://www.codecademy.com/courses/web-beginner-en-TlhFi/0/5"/>
        <title>Result</title>
    </head>
    <body>
        <p>I want to be SIZE 44 font!</p>
    </body>
</html>

Answer 5272b1ad80ff33919c00050b

1 vote

Permalink

This line should point to the stylesheet.css tab

<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
points
Submitted by Roy
over 10 years

3 comments

fireyfashions123 almost 9 years

I dont understand

Roy almost 9 years

You got me. What don’t you understand?

Roy almost 9 years
tells the browser to request this resource. type is the MIME type of the file to expect. It's text based and follows the CSS recommendation. rel describes the relation this resource has to the root document. It's a style sheet. href is the hook reference of the resource, its URI or URL. 'stylesheet.css'. That about covers it.

Answer 52824aa5f10c602359003dc1

1 vote

Permalink

Hm..

<link type=”text/css” rel=”stylesheet” href=”stylesheet.css”**<**/>

The < after “Stylesheet.css” is unnecessary.. ?

points
Submitted by Palmborg
over 10 years

1 comments

Roy over 10 years

No. That would be a typo. Browsers are pretty forgiving, and may ignore it, but it’s still errant syntax.

Answer 527dd581f10c60bbc30016c9

0 votes

Permalink

<!DOCTYPE html>

<html>
    <head>
        <link type="text/css" rel="stylesheet"
 href="stylesheet.css"</>
        <title>Result</title>
    </head>
    <body>
        <p>I want to be SIZE 44 font!</p>
    </body>
</html>

(I did it this way)

points
Submitted by Tan Yp
over 10 years

1 comments

Josiah D Lawhorn over 10 years

This worked for me. thx

Answer 535d8aa49c4e9d719a0003d6

0 votes

Permalink

If you’re getting a strange number for the font size (like 44.6363), try resetting your zoom with Ctrl-0 or Cmd-0.

points
Submitted by michael suell
almost 10 years

Answer 540dceca548c35be0e00e550

0 votes

Permalink

This was what I was looking for, too. The hints tab tells you to enter in stylesheet.css as your href, but I want to know if that is what you always put in there, or if this is a special case because it’s a tab on the same page?

points
Submitted by UmTheMuse
over 9 years

1 comments

Roy over 9 years

That is the normal way to import an external style sheet. The tab is part of the editor environment. The file itself is in the same directory as the index.html file. The key is to be sure the href path points the CSS file.