HTML <b>, <strong>, <big>, <small>, <em>, <i>, <sub>, and <sup> tags

Source: Internet
Author: User

HTML <b> Tags

All browsers support <b> tags.

Definition and usage

The <b> tag specifies bold text.

Note: The <b> tag should be used as the last option, according to the HTML5 specification, when no other suitable label is appropriate. HTML5 Specification declaration: You should use

Tip: You can also use the CSS "Font-weight" property to set bold text.

HTML <strong> tag Definition and usage

<strong> tags, like <em> tags, are used to emphasize text, but it emphasizes a bit more.

Browsers usually display the contents of the <strong> tag in a different way from the <em> tag, usually using bold fonts (relative to italic) to display the contents, so that the user can distinguish between the two tags.

If common sense tells us that we should use less <em> tags, then the number of <strong> tags should appear less. If the text that is decorated with the <em> tag seems to be shouting loudly, then the text that is decorated with the <strong> tag is like screaming. The words of a taciturn person are always promise, and as such, restricting the use of <strong> can make it more noticeable and effective.

As an example, users who visit W3school frequently notice that the first sentence of many tutorial pages is shown in bold, and in fact, we use <strong> tags for this digest. The reason for using this tag is that we think that the tutorial summary not only summarizes the content of the page, but also is in the most important position of the page, and its content is naturally very important and worth emphasizing.

HTML <big> Tags

All browsers support <big> tags.

Definition and usage

The <big> label renders a large font effect.

Using the <big> tag makes it easy to enlarge the font. This is simply not easy: When the browser displays text that is contained between the <big> label and its corresponding </big> tag, its font is a number larger than the surrounding text. However, if the text is already the largest font, this <big> tag will not work.

Even better, you can nest <big> tags to enlarge the text. Each <big> tag can have a larger font size until the upper 7th text, as defined by the font model.

But be careful when using <big> tags, because browsers are always wide-ranging trying to understand tags, and for browsers that don't support <big> tags, they often think of them as bold tags.

HTML <small> Tags

All browsers support <small> tags.

Definition and usage

<small> label renders small font effect.

The <small> tag is the same as the <big> tag it corresponds to, but it shrinks the font instead of zooming in. If the enclosing font is already the minimum size supported by the font model, then the <small> tag will have no effect.

Similar to <big> tags,,<small> tags can also be nested, thus continuously reducing the text. Each <small> tag will make the text smaller by one number until it reaches the lower limit of one word.

HTML <em> tag Definition and usage

The <em> tag tells the browser to show the text as an emphasis. For all browsers, this means to display the text in italics.

Adding emphasis to the text also requires skill. If you emphasize too much, some important phrases will be omitted, and if you emphasize too little, you will not be able to really highlight the important parts. This is the same as seasoning, it is best not to abuse the emphasis.

Although the contents of the <em> tag are now displayed in italics, they also have a broader meaning, and in the future, browsers may use other special effects to display the highlighted text. If you only want to use italics to display text, use the <i> tab. In addition, the document can include cascading style definitions for changing the display of text.

In addition to highlighting, consider using <em> tags when introducing new terminology or as a fixed style when referencing a particular type of term or concept. For example, W3school often uses <em> tags for important terms. <em> tags can be used to distinguish these names from other italic characters.

HTML <i> Tags

All browsers support <i> tags.

Definition and usage

<i> Labels Display italic text effects.

<i> tags and content-based style tags <em> similar. It tells the browser to display the text contained therein in italics (italic) or italic (oblique) font. If this italic word is not available to the browser, you can use styles such as highlighting, anti-white, or underline.

Tip:<i> tags must be used with the end tag </i> combined together.

HTML 5 <sub> and <sup> tags definition and usage

<sub> tags define subscript text. <sup> can define superscript text.

HTML <b>, <strong>, <big>, <small>, <em>, <i>, <sub>, and <sup> tags

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.