search
HomeWeb Front-endHTML TutorialWhat is the difference between b tag and strong tag in html? Summary of the difference between b and strong

This article mainly talks about the difference between the b tag and the strong tag in HTML. It also introduces some details about the bolding of b tags and strong tags. Finally, there is a summary of html b tags and strong tags. Finally, let’s take a look at this article.

First of all, this article This article introduces themselves to the b tag and strong tag in HTML:

b tag in HTML:Bold tag elements Tells the browser to display the b-tagged text in bold to the viewer. For all browsers, this means that this text should be presented in a bold (bold) style for everyone to display

strong tag in HTML: < ;/strong>The bold tag element tells the browser to display the strong tag text to the viewer in bold. For all browsers, this means making this text bold for everyone to see. Html strong bold tag and html b bold tag have the same display effect. Both display and present the content text in bold. Both can choose to use

. Let’s look at the code examples one by one. There are renderings:

PHP中文网!<br/>
PHP中文网的网址是<b>www.php.cn</b> !<br/>
我被HTML b标签<b>加粗的</b>。

The effect of this is as follows:

What is the difference between b tag and strong tag in html? Summary of the difference between b and strong##

PHP中文网!<br/>
PHP中文网的网址是<strong>www.php.cn</strong> !<br/>
我被HTML strong标签<strong>加粗的</strong>。

The example renderings of the strong tag are as follows:

What is the difference between b tag and strong tag in html? Summary of the difference between b and strong

After reading so much, I probably still don’t understand much.

Now let’s take a look at some details of b tags and strong tags:

strong represents the meaning of the content text. b means that the text style is bold. The difference between the two is basically invisible in the HTML specification. In xhtml, due to the emphasis on "separation of style and content", the b representing style has been eliminated. Instead, other tags appear. Note that strong does not replace b. strong represents emphasis, and you can customize any style to represent emphasis. It's just that the default style of strong is the same as b.

is an emphasis tag; is a bold tag

They all function as bold fonts. In most cases, they have roughly the same effect. The difference is that the tag is an entity tag, and the characters it surrounds will be set to bold (bold), while A label is a logical label. Its function is to strengthen the mood of a character. Generally speaking, strengthening the mood of a character is achieved by changing the character to bold. But the situation may also be different under different HTML interpreters.

There are two situations in actual web design

1. Consider from the client

In order to make the page effect affected To minimize the impact of client factors, we should try to use entity tags b

often if we are in a certain article. Use strong for keywords that need to be bolded, and words that need to be bolded to attract the user's attention. Still need to use B. The font-weight:bold attribute of CSS is only used when bold fonts are more beautiful in certain places. But from the perspective of SEO, there is basically no difference between b and CSS Font-weight:bold.

It’s not that the introduction of strong eliminates b. b is 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 defined in other styles. the emphasis effect.​

2. Considering the w3c standards

In order to comply with the current W3C standards, it is recommended to use the strong tag

strong tag: the visual effect is bold. HTML semantics are emphasis, indicating emphasis and emphasis in tone.

When a blind person uses a screen reader, the difference between B and Strong can be clearly seen. When encountering B, read it in the same way as ordinary words. When encountering Strong, it will be emphasized and paused.

b tag: visual effect bold. It does not have HTML semantics per se.

Summary of the difference between b tag and strong tag in html:

html There is no difference in essence between b bold and html strong bold, and there is no difference in usage and syntax. It is recommended that everyone Don't pursue this problem deliberately; just use the two bold tags according to your usual habits; the html b bold tag is the earlier html that uses the bold function tag, and html strong is later supported by all browsers. Both bold functions.

The above is the entire content of this article. If you have any questions, you can ask below

[Editor’s recommendation]

How to set the font size of the html font tag ? Introduction to the usage of html font tag attribute

What is the document object in html? An article to let you understand the document object

The above is the detailed content of What is the difference between b tag and strong tag in html? Summary of the difference between b and strong. For more information, please follow other related articles on the PHP Chinese website!

Statement
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
The Versatility of HTML: Applications and Use CasesThe Versatility of HTML: Applications and Use CasesApr 30, 2025 am 12:03 AM

HTML is not only the skeleton of web pages, but is more widely used in many fields: 1. In web page development, HTML defines the page structure and combines CSS and JavaScript to achieve rich interfaces. 2. In mobile application development, HTML5 supports offline storage and geolocation functions. 3. In emails and newsletters, HTML improves the format and multimedia effects of emails. 4. In game development, HTML5's Canvas API is used to create 2D and 3D games.

What is the root tag in an HTML document?What is the root tag in an HTML document?Apr 29, 2025 am 12:10 AM

TheroottaginanHTMLdocumentis.Itservesasthetop-levelelementthatencapsulatesallothercontent,ensuringproperdocumentstructureandbrowserparsing.

Are the HTML tags and elements the same thing?Are the HTML tags and elements the same thing?Apr 28, 2025 pm 05:44 PM

The article explains that HTML tags are syntax markers used to define elements, while elements are complete units including tags and content. They work together to structure webpages.Character count: 159

What is the significance of <head> and <body> tag in HTML?What is the significance of <head> and <body> tag in HTML?Apr 28, 2025 pm 05:43 PM

The article discusses the roles of <head> and <body> tags in HTML, their impact on user experience, and SEO implications. Proper structuring enhances website functionality and search engine optimization.

What is the difference between <strong>, <b> tags and <em>, <i> tags?What is the difference between <strong>, <b> tags and <em>, <i> tags?Apr 28, 2025 pm 05:42 PM

The article discusses the differences between HTML tags , , , and , focusing on their semantic vs. presentational uses and their impact on SEO and accessibility.

Please explain how to indicate the character set being used by a document in HTML?Please explain how to indicate the character set being used by a document in HTML?Apr 28, 2025 pm 05:41 PM

Article discusses specifying character encoding in HTML, focusing on UTF-8. Main issue: ensuring correct display of text, preventing garbled characters, and enhancing SEO and accessibility.

What are the various formatting tags in HTML?What are the various formatting tags in HTML?Apr 28, 2025 pm 05:39 PM

The article discusses various HTML formatting tags used for structuring and styling web content, emphasizing their effects on text appearance and the importance of semantic tags for accessibility and SEO.

What is the difference between the 'id' attribute and the 'class' attribute of HTML elements?What is the difference between the 'id' attribute and the 'class' attribute of HTML elements?Apr 28, 2025 pm 05:39 PM

The article discusses the differences between HTML's 'id' and 'class' attributes, focusing on their uniqueness, purpose, CSS syntax, and specificity. It explains how their use impacts webpage styling and functionality, and provides best practices for

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools