HTML text formatting <b><big><em><i><small><strong><sub><sup><ins> <del>

Source: Internet
Author: User

<b> Tags-Bold

Definition and Usage:

The <b> tag specifies bold text.

Hints and Notes

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 to represent headings, use <em> tags to represent stressed text, and use <strong> Labels to represent important text, you should use the <mark> tag to represent the marked/highlighted text.

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

<big> Tags-Large font

Definition and Usage:

<big> tags provide large font effects.

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.

<em> Tags- Italic Body

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.

<i> Tags- Italic Body

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.

In terms of performance <em></em>,<i></i> performance are all the same, are represented in italics.

But the <em> tag is a "semantic" tag, and the search engine will understand the semantics. It is deliberately set to mean "accent" in HTML. Some screen readers may use different inflection when they find these "stressed" labels, which is more beneficial for SEO.

<em> represents the content that is emphasized to render,<i> is physically italic and has no meaning on the content.

<small> Tags- Small Font

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.

<strong> Labels-Bold fonts

Definition and Usage:

<strong> tags define text as a stronger accent.

<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.

<sub> Tags- Subscript Text

Definition and Usage:

<sub> tags define subscript text.

The content contained in the <sub> tag and its end tag </sub> is displayed in half the height of the character in the current text stream, but is the same as the font and font size of the text in the current text stream.

Tip: This tag is useful for adding footnotes to a document and for representing exponential values in equations. If used in conjunction with the <a> tag, you can create a good hyperlink footnote.

<sup> Tags -Superscript text

Definition and Usage:

<sup> labels can define superscript text.

The content contained in the <sup> tag and its end tag </sup> is displayed in half the height of the character in the current text stream, but is the same as the font and font size of the text in the current text stream.

Tip: This tag is useful for adding footnotes to a document and for representing exponential values in equations. If used in conjunction with the <a> tag, you can create a good hyperlink footnote.

<ins> Tags- underline text

Definition and Usage:

The <ins> tag defines the text that has been inserted into the document.

Tips and Comments:

Tip: Use with <del> to describe updates and corrections in the document.

Property:

    • The cite property points to the URL of a document that explains why the text was inserted or modified.
    1. Example: <ins cite= "why_inserted.htm" >red</ins>
    2. Cite properties are not supported by mainstream browsers.
    • The datetime attribute specifies the date and time that the text is inserted or modified.

    1. datetime="2009-08-08T21:55:06Z">red</ins>
    2. No mainstream browser uses the DateTime attribute in any way.

<del> Tags- delete text

Definition and Usage:

Defines the text that has been deleted in the document.

Tips and Comments:

Note: Use with the <ins> tag to describe updates and corrections in the document.

Property:

    • The cite property points to the URL of a document that explains why the text was deleted.
    1. Example:<del cite="why_deleted.htm">20</del>
    2. Cite properties are not supported by mainstream browsers.
    • The datetime attribute specifies the date and time that the text was deleted.

    1. datetime="2009-08-08T21:55:06Z">20</del>
    2. No mainstream browser uses the DateTime attribute in any way.

Example:

This text is bold <b> label
This text is strong <strong> label
This text is big <big> label
This text is emphasized <em> label
This text is italic <i> label
This text is small <small> label
This text containssubscript <sub> label
This text containssuperscript <sup> label

<b>This text is bold</b><BR/><Strong>This text is strong</Strong><BR/><Big>This text is big</Big><BR/><em>This text is emphasized</em><BR/><I>This text is italic</I><BR/><Small>This text is small</Small><BR/>This text contains<Sub>Subscript</Sub><BR/>This text contains<sup>Superscript</sup>

HTML text formatting <b><big><em><i><small><strong><sub><sup><ins> <del>

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.