开发者

CSS equivalent of <big>

开发者 https://www.devze.com 2023-03-18 06:37 出处:网络
What is the开发者_如何学JAVA CSS equivalent of the <big> element? If I\'m not mistaken then wrapping your text in the <big> element is not the same as setting a larger font-size.Google Chr

What is the开发者_如何学JAVA CSS equivalent of the <big> element? If I'm not mistaken then wrapping your text in the <big> element is not the same as setting a larger font-size.


Google Chrome says:

big {
     font-size: larger;
}

That should be the corresponding CSS. Anyway, make sure not to use tags like big since they go against the rule which states HTML should be used to describe the content, not the appearance. You could go for something like:

<span class="important-text">My important text</span>

And use this in CSS:

span.important-text {
     font-size: larger;
}

Which is the correct form, whereas

<big>My important text</big>

is incorrect.


This

<span style="font-size:larger">...</span>

is a direct equivalent of the <big>


The W3C says:

BIG: Renders text in a "large" font.

So setting a larger font-size should be fine.


font-size:200% = font-size:2.0em = <big><big><big>
0

精彩评论

暂无评论...
验证码 换一张
取 消