As in the title, I want to change a word to red. HTML5 does not have a font. What should I use? span?div?or use some other tag?
If color="red" doesn't work, replace it with style="color:red"
No, I mean what to use Label.
Use span for ordinary text blocks
span seems to become a block.
Then use the style to change
The default span is inline
The tag is very arbitrary, just follow the default. span is not a block. If you use it, it becomes a block. It's because it's controlled. You can use b, var, strong, p, etc. It depends on your situation, and then look at the semantics of the label, and then see if it's fully controlled.
Use styles to change...
Set display
Use span at row level
Use div p at block level
The tag is very Feel free to use it according to the default. span is not a block. If you use it to become a block, it is because it is controlled. You can use b, var, strong, p, etc. It depends on your situation, and then look at the label. Semantics, let’s see if it’s all under control
7# has revealed the true meaning, LZ will post it as soon as possible.
I use span, for example:
<p>我很<span style="color:red">丑</span>,但是我很<span style="font-weight:700;">温柔</span>。</p>
What does changing a word to red have to do with what tag to use? Just use CSS to change the color attribute.
Use styles to change it! Font is rarely used now!