HTML Basics III exs.13. Spantastic


#1

i need a little help

this is my code





	"<p> This text is black, except for the word  <span>red</span>!</p>"

</body>

and i need to: Wrap the word "red" in the editor in" < span>" tags and give the "< span>"tag style="color:red". Notice how only the word between the "< span>< /span>" tags changes color!

thanky you!


#2

You haven't done anything? If you need a syntax refresher, i recommend to go back to a certain exercise, for example this one


#3

i can color the full line but i dont know hot to color only one word in between < span> < /span> tags


#4

Well, simple, you add the style attribute to the span opening tag rather then the paragraph opening tag


#5

remember the syntax exact ?

<tag style="property:value;"></tag>


#6

well thank you :slightly_smiling:

i didnt know how to do it with span, changing the color of just one word. But now i know.


#7

I'm having the similar problems although when I look for solutions it appears that I'm right? IDK but I can't seem to get past this part (sorry IDK how to make another thread, if that's a problem) here is my code:

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


#8

you are missing the " around where you property (color) and your vaue (red) should:

<span style="property: value">

#9

OK. That just gets confusing cause on another part I was doing earlier (can't remember what exactly offhand) using the quotation marks was actually making it so I couldn't get through, although the example was showing with quotations. Thank you though.


#10

Weird, all exercises should work with ", but good you made it work. Quotation marks where mandatory in this situation before html5 came around