26. Code is correct, but will not work


#1

Here is my HTML:

<head>
<style rel="stylesheet"; href="stylesheet.css"; type="text/css"/>
	<title>Result</title>
</head>
<body>
    <h1>
        This is example text.
    </h1>
    <p>This is more example text!</p>
    <img src="https://scontent-frt3-1.xx.fbcdn.net/hphotos-xpt1/v/t1.0-9/12669431_10156564915980694_8960011699717093840_n.jpg?oh=9492332873f798768c17759395db3c4foe=572E6A70"/>
    <a href="be.go.su">Remember to always be GOSU!</a>
</body>

Here is my CSS:

h1 {
font-family:Verdana, sans-serif;
color:#576D94;

}

p {
font-size:18px;
color:#4A4943;
font-family:Garamond, serif;
}

img {
height=100px;
width=300px;
border=1px solid #4682b4;
}

a {
text-decoration: none;
color: #cc0000;
}

It keeps asking me if I set text-decoration to none, why I did as you can see...


#2

few problems, first off in this line:

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

there are internal stylesheets, in which case you want to use, for example:

<style>h3 { color: red;}</style>

then there is a link:

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

which you use in case of an external stylesheet, which is what you have. So change <style to <link
then, in link, attributes (rel, href, type) are separated by spaces only, no semi-colons, that is when you use the style attribute.

Not everyone can see images from facebook, keep in mind it might not show up if you want to show it to other people.

then your image css selector:

img {
    height=100px;
    width=300px;
    border=1px solid #4682b4;
}

for some reasons, you use equal signs after the property's, rather then colons. I believe that was it


#3

2 posts were split to a new topic: Text between link tags


#4

Ok, I fixed everything, but I still have some problems. Here's my code once again:

	<head>
	<link rel="stylesheet"; href="stylesheet.css"; type="text/css"/>
	<title>Result</title>
	</head>
	<body>
	    <h1>
	        This is example text.
	    </h1>
	    <p>This is more example text!</p>
	    <img src="http://i.kinja-img.com/gawker-media/image/upload/y6k2hs8svqdlp9vvewxt.jpg"/>
	    <a href="be.go.su">Remember to always be GOSU!</a>
	</body>
</html>

CSS:

h1 {
font-family=Verdana, sans-serif;
color=#576D94;

}

p {
font-size=18px;
color=#4A4943;
font-family=Garamond, serif;
}

img {
height=100px;
width=300px;
border=1px solid #4682b4;
}

}

a {
text-decoration= none;
color= #cc0000;
}


#5

As you can see, it worked.
My browser simply cannot accept the fact that I am smarter.


#6

Did you read my answer properly? I said after a property there should be a colon, general syntax:

selector {
  property: value;
}

now you replaced all colons with equal signs :frowning: and you didn't remove the semi-colons inside the <link> either

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#7

OK! WOW! That was a brainfart.

I removed the link semicolons and changed all the css to have colons, not equal signs. Still, I get errors.

HTML:

	<head>
	<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
	<title>Result</title>
	</head>
	<body>
	    <h1>
	        This is example text.
	    </h1>
	    <p>This is more example text!</p>
	    <img src="http://i.kinja-img.com/gawker-media/image/upload/y6k2hs8svqdlp9vvewxt.jpg"/>
	    <a href="be.go.su">Remember to always be GOSU!</a>
	</body>`

CSS:

    h1 {
        font-family:Verdana, sans-serif;
        color:#576D94;
        
    }

    p {
        font-size:18px;
        color:#4A4943;
        font-family:Garamond, serif; 
    }

    img {
        height:100px;
        width:300px;
        border:1px solid #4682b4;
    }

    }

    a {
        text-decoration: none;
        color: #cc0000;
    }

#8

your img css selector has two closing curly brackets (}), this should be one. For the rest, it is fine


#9

Wow. Thanks a lot, but it is crazy how easy it is to make a small mistake and screw up all your code. Thanks for the help man!


#11

A post was merged into an existing topic: 26 will not work


#12