Home > Web Front-end > HTML Tutorial > The difference between and , and tags in HTML

The difference between and , and tags in HTML

巴扎黑
Release: 2017-06-27 11:15:18
Original
2399 people have browsed it

1) Regarding the difference between b and strong in the html tag , I only noticed it when I used it today. I used to use them mixedly, but I only noticed these two when I was working today. Label difference.

are used on web pages. By default, they all function as bold fonts. The difference between the two is that the tag is an entity tag, and the characters it surrounds will be set to bold (bold), and the tag is a logical tag. Its function is to strengthen the tone of the character. Generally speaking, strengthening the tone of the character is by changing the character to bold (bold). realized.

Note: What is a physical marker? What is a logical tag?

Physical elements emphasize a physical behavior. For example, if I bold a piece of text with a b mark, I mean to tell the browser that it should be bolded for me. Bold displays this text. From the semantics of the word, we can also analyze that b is the abbreviation of Bold (bold), so the meaning conveyed by this B mark is only bold, without any other effect. .

And we can know from the literal understanding of Strong that it means emphasis, so we use this tag to convey a message to the browser to emphasize a certain paragraph of text, and this Strong is what we call a logical element. It emphasizes the logic of the document, not telling the browser how it should be displayed.

Similarly, I is Italic (italic), and em is emphasize (emphasis).

So: the physical elements tell the browser in what format I should display the text, and the logical elements tell the browser how important these texts are.

Summary: Simply put, strong is the tag of xhtml in the web standard, and strong means "emphasis"; b is the of html, and the tag of b It means bold. Web standards advocate that xhtml does not involve specific forms of expression. "Emphasis" can be emphasized by bolding or other methods, such as underlining, increasing the font size, such as red, etc. Strong can be changed through CSS specific performance.

It’s not that with strong, b is eliminated, but this b is very innocent, just because it means bolding the font, which happens to be the same as the effect of strong by default. In fact, this strong can be completely The emphasis effect defined as another style

WEB standards advocate the separation of style and content, so it is no longer recommended to use B purely to achieve boldness.

From the perspective of XHTML document meaningfulness and user experience, strong is more beneficial and is recommended to be used. As for SEO, it depends on the optimization situation.

Conclusion: For search engines, and are more important than and . In order to comply with the current W3C standards, it is recommended to use the strong tag.

   

  2) The tag tells the browser to represent the text within it as emphasized content. For all browsers, this means displaying this text in italics.

Adding emphasis to text also requires skills. If you emphasize too much, some important phrases will be missed; if you emphasize too little, you won't really highlight the important parts. It's the same with condiments that it's best not to overuse the emphasis.

Although the contents modified by tags are currently displayed in italics, these contents also have a broader meaning. One day in the future, browsers may also use other special effects to Display highlighted text. If you only want to italicize text, use the tag. In addition, documents can also include cascading style definitions that change the display of text.

In addition to emphasis, consider using the tag when introducing new terms or as a set style when referencing a specific type of term or concept. For example, W3School often uses tags for important terms. The tag can be used to distinguish these names from other italicized words.

The conclusion is the same as above. In order to comply with the current W3C standards, it is recommended to use the tag.

3) Note: The tag is the same as the tag, which is used to emphasize text, but it emphasizes The degree is stronger.

The above is the detailed content of The difference between and , and tags in HTML. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template