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

The difference between and , and tags in HTML

Jun 27, 2017 am 11:15 AM
html strong the difference

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!

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)

The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

React's Role in HTML: Enhancing User Experience React's Role in HTML: Enhancing User Experience Apr 09, 2025 am 12:11 AM

React combines JSX and HTML to improve user experience. 1) JSX embeds HTML to make development more intuitive. 2) The virtual DOM mechanism optimizes performance and reduces DOM operations. 3) Component-based management UI to improve maintainability. 4) State management and event processing enhance interactivity.

Understanding HTML, CSS, and JavaScript: A Beginner's Guide Understanding HTML, CSS, and JavaScript: A Beginner's Guide Apr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

How to set password protection for export PDF on PS How to set password protection for export PDF on PS Apr 06, 2025 pm 04:45 PM

Export password-protected PDF in Photoshop: Open the image file. Click "File"> "Export"> "Export as PDF". Set the "Security" option and enter the same password twice. Click "Export" to generate a PDF file.

The difference between H5 and mini-programs and APPs The difference between H5 and mini-programs and APPs Apr 06, 2025 am 10:42 AM

H5. The main difference between mini programs and APP is: technical architecture: H5 is based on web technology, and mini programs and APP are independent applications. Experience and functions: H5 is light and easy to use, with limited functions; mini programs are lightweight and have good interactiveness; APPs are powerful and have smooth experience. Compatibility: H5 is cross-platform compatible, applets and APPs are restricted by the platform. Development cost: H5 has low development cost, medium mini programs, and highest APP. Applicable scenarios: H5 is suitable for information display, applets are suitable for lightweight applications, and APPs are suitable for complex functions.

HTML: The Structure, CSS: The Style, JavaScript: The Behavior HTML: The Structure, CSS: The Style, JavaScript: The Behavior Apr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web Design The Future of HTML: Evolution and Trends in Web Design Apr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML: Building the Structure of Web Pages HTML: Building the Structure of Web Pages Apr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

See all articles