What is the difference between B-tags and strong tags in html? Summary of differences between B and strong

Source: Internet
Author: User
This article focuses on the differences between the B-tags and strong tags in HTML. The details of the B-tag and the strong label are described separately, and finally there is a summary of the HTML B-tags and strong tags, and finally, let's take a look at this article.

First of all, this article gives an introduction to the B-tags and strong tags in HTML:

the b tag in HTML :<b></b> the Bold tag element tells the browser to display the text of the B tag in bold to the viewer. For all browsers, this means that the text bold (bold) style is presented to everyone

the strong tag in HTML :<strong></strong> the Bold tag element tells the browser to display the text of the strong tag in bold way to the viewer. For all browsers, this means adding the text to your display. HTML strong bold labels are the same as HTML B bold labels, both of which display the content text in bold, and both have the option to use

One more look at the code examples are also:

Topic.alibabacloud.com!<br/>topic.alibabacloud.com's URL is <b>www.php.cn</b>!<br/> I was HTML b tag <b> Bold </b>.

The effect of this is as follows:

Topic.alibabacloud.com!<br/>topic.alibabacloud.com's website is <strong>www.php.cn</strong>!<br/ > I was tagged with html strong <strong> bold </strong>.

Examples of strong tags are as follows:

See so much, should still not how to read it.

Now take a look at some of the details of the B-tags and strong tags:

Strong represents the meaning of the content text. b represents the style in which the text is bold. The difference between the two in the HTML specification is largely invisible. In XHTML, the B that represents the style is cut out due to the emphasis on "separation of style from content". Instead, there are other labels. Note that strong is not a substitute for B. Strong delegates emphasize that you can customize any style to represent emphasis. Just the default style of strong is the same as B.

<strong> is a heavier tone label;<b> is a bold label

They all play the role of bold fonts. In most cases, they appear to have the same effect, the difference is that the,<b> tag is an entity tag, the character that surrounds it will be set to bold (bold), and the <strong> tag is a logical label, it is to strengthen the tone of the character, generally , the tone of the reinforcing character is achieved by turning the character into bold (bold). However, under different HTML interpreters, the situation may vary.

There are two scenarios in the actual web page design

1. Consider from the client

To minimize the impact of the page effect on client-side factors, use the entity label B

Often if we are in an article. Need to bold keywords with strong, and need to bold a sentence to draw the attention of users. Still need to use B's. The Font-weight:bold property of CSS is used only when it feels more beautiful in some places. But from the SEO side of the filter, B and CSS Font-weight:bold basically no difference.

Not to say that with the strong, the elimination of b,b because of their own expression is the font bold, coincides with the strong by default, the effect of the emphasis on the same, in fact, this strong can be defined as a different style of the emphasis effect.

2. Considering the standards

It is recommended to use the strong label in order to meet the current standards

Strong tags: visual effects bold. HTML semantics for emphasis, the expression of emphasis on the tone, aggravated.

When a blind person is using a screen reader, the difference between B and strong can be clearly demonstrated. When encountering B, read the same as the ordinary words, and when encountering strong, the return to aggravation and pause.

b tag: visual effect bold. Does not have HTML semantics on its own.

A summary of the differences between the B-tags and strong tags in HTML:

HTML b Bold and HTML strong bold Nature no difference, the use of grammar is not different, it is recommended that you do not deliberately pursue this problem, in accordance with the usual habit of using both bold tags can be; HTML b bold label is older HTML appears using the Bold function label, and HTML Strong a little later, all browsers now support both of these bold features.

The above is the whole content of this article, what questions can be asked below

Related Article

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.