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

CSS: An Overview Forum

View Course » View Exercise

101 points
7069222134c621683d5605f071026e3d?s=140&d=retro
Submitted by
Meaghan Conklin
over 3 years ago

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>

1 vote

permalink

This line should point to the stylesheet.css tab

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

7734 points
58dc9a7fdd1edef33e000457_828040695
Submitted by
Roy
over 3 years ago

3 Comments

5544291ce39efe5361000403_843756681 fireyfashions123 about 2 years ago

I dont understand

58dc9a7fdd1edef33e000457_828040695 Roy about 2 years ago

You got me. What don't you understand?

58dc9a7fdd1edef33e000457_828040695 Roy about 2 years ago

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.


1 vote

permalink

Hm..

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

The < after "Stylesheet.css" is unnecessary.. ?

159 points
8cfa03a71740056d73a12faf07293e21?s=140&d=retro
Submitted by
Palmborg
over 3 years ago

1 Comment

58dc9a7fdd1edef33e000457_828040695 Roy over 3 years ago

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


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)

195 points
528329c080ff3366ee00140d_777633484
Submitted by
Tan Yp
over 3 years ago

1 Comment

52759b01abf82128d5001046_95167259 Josiah D Lawhorn over 3 years ago

This worked for me. thx


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.

268 points
5351af81282ae32177000132_214531155
Submitted by
michael suell
about 3 years ago


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?

1214 points
Df7e7a3af5da99696d088db91bc7cb36?s=140&d=retro
Submitted by
UmTheMuse
over 2 years ago

1 Comment

58dc9a7fdd1edef33e000457_828040695 Roy over 2 years ago

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.