Jump to content

Very basic HTML question


adam1

Recommended Posts

Im trying to have a * red and then a text. But the code I write keeps spacing the from each other. Any idea what im doing wrong?Im trying to do this:Note * indicates a required fieldand another where it saysEmail address: *I know this is very simple but I cant seem to get the code right. Everytime I do the text goes one space down.

Note <p style="color:red;">*</p> indicates a required fieldEmail Address:<p style="color:red;">*</p>

Thanks in advance! :)

Link to comment
Share on other sites

that's because <p> is a block level element, and by default they start on their own lines. however, this is exactly what the <span> is for, which is an inline element by default and will not break to a new line.

Note <span style="color:red;">*</span> indicates a required fieldEmail Address:<span style="color:red;">*</span>

you would probably want to consider making a class for the red text style though.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...