Do you know the difference between <strong> and <b>; <i> and <em>?

一:<b>

W3school definition:

      The <b> tag specifies bold text. (to achieve bold display effect)

      The canonical statement for H5:

1) Use <h1~6> to represent the title,

2) Use <em> to represent emphasized text,

3) Use <strong> for more important text,

4) Use the <mark> tag to indicate marked or highlighted text.

5) The <b> tag should be used as the last option only when there is no other more suitable tag.

Two: <strong>

W3school definition:

      Define text as emphasized content with stronger tone (different from em's definition of text as emphasized content. )

      W3school defines strong as a phrase element, and most of the text defined by the tag will show a special style and have exact semantics. At the same time, if the official website definition is only to achieve a certain visual effect, it is recommended to use a style sheet (css) because it will achieve a richer effect.

 

Differences between <b> and <strong>:

      First of all, the difference between the two is that the former belongs to physical tags (entity tags) and the latter belongs to logical tags; at this time, it is necessary to carefully savor the meaning of these two tags. The physical label...emmmmm... should be a visual display effect, it only conveys the command to make the text in the element become this effect, it has no semantic meaning. And the logical label.... I believe it must have some meaning in logic and semantics. What he emphasizes is the document logic of the tag in the document, not a command to tell the browser how to display the text.

Strong and b have the same visual effect, but b means bold. The display style of this label is bold, but the display style of strong can be changed. He just specifies the bold style to achieve A visual emphasis. He can also highlight it in other ways (bold is just the default style of strong), such as adding an underline, changing the color, adding an italic or something. One day when strong is unhappy, he will stop playing with b and change to another display style, then there will be no misunderstanding of distinction. However, in order to comply with current standards, it is recommended to use the strong tag.

三:<i>

      Official definition: The <i> tag is used to display italic text effects (i is similar to the content-based style tag em, it tells the browser to display the text contained in it in italic or oblique font, if this If the italic type is not available to the browser, you can use highlighting, highlighting, or underlining styles).

 

Four: <em>

      Definition: em is used to define text as emphasized content. (distinguish strong)

In W3school, em is defined as a phrase element, and most of the text defined by the tag will show a special style and also have exact semantics. At the same time, if the official website definition is only to achieve a certain visual effect, it is recommended to use a style sheet (css) because it will achieve a richer effect.

 

<i><em>The difference:

      Similar to b and strong, i is a physical element, em is a logical element, i is italic and em is emphasize. Physical elements, to put it bluntly, tell the browser how I should display the text in what format, and these logical elements tell the browser how important the text is. <b> and <i> are deprecated in the current system, because they only represent bold and italics without any semantic meaning. And for search engines <strong> and <em> are more important than <b><i>, so both are usually replaced by <strong><em>.

 

Difference between <em>and <strong>:

      In the definition, <em> means to emphasize the text—that is, to define the text as the content of emphasis. <strong> means more important emphasis, he expresses it as a stronger tone in tone. Both are used to emphasize content, but <strong> is stronger in tone and more profound.

 

Definition of <em>, <strong> and similar elements in W3school.

http://www.w3school.com.cn/tags/tag_phrase_elements.asp

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325804845&siteId=291194637