Home Web Front-end HTML Tutorial What is the difference between b tag and strong tag in html? Summary of the difference between b and strong

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

Sep 01, 2018 pm 02:47 PM
b html 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>。
Copy after login

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>。
Copy after login
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 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

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles