Spantastic red. A bug?


#1

Edit: I realized I forgot to add "" in "color:red"

I'm not sure, though, why the preview editor would show the correct result in cases when the code isn't.

It seems like I did everything correct in this code, where I had to make "red" red, but it still gives me an error, saying I should make sure that only the "red" is enclosed in span tags. Any idea why this is happening? The preview window gives me the result I want. Is it a bug?

<!DOCTYPE html>
<html>
	<head>
		<title></title>
	</head>
	<body>
		<p>This text is black, except for the word <span style=color:red>red</span>!</p>
	</body>
</html>

#2

the quotation marks (") are missing around color: red


#3

Yup, thanks! Just got it. Do you know why the preview editor is showing the result correctly, though? even without quotation marks. I mean, is it considered valid code?


#4

with the latest html5 standards quotation marks are no longer mandatory, however codecademy decide to write a new course rather then update the old one, everything in this course is still valid, but sometimes the latest html5 standards are allow for a bit more easy syntax (like no quotation marks)

this course doesn't have this standards implanted

having said that, i would still use quotation marks for style (many people do)


#5

Thanks for the answer! It's good to know.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.