Home Web Front-end HTML Tutorial What is the sub tag in html? Introduction to the definition and use of html sub tags

What is the sub tag in html? Introduction to the definition and use of html sub tags

Aug 23, 2018 pm 01:41 PM
html sub

本篇文章关于html sub标签的定义和使用方法做了个大致的介绍,认真读完的应该能明白这个标签的具体用法,因为这个标签是和html sup标签一起使用才能更好,所以下一篇就将是关于sup标签的内容了,好了,下面开始看内容吧

html中sub标签的定义和用法:

标签可定义下标文本。

包含在 标签和其结束标签 中的内容将会以当前文本流中字符高度的一半来显示,但是与当前文本流中文字的字体和字号都是一样的。

提示:无论是 标签还是和它对应的 标签,在数学等式、科学符号和化学公式中都非常有用。

HTML 标签实例

定义sub为下标文本:

<p>这个文本包含 <sub>下标</sub>文本。</p>
Copy after login

字体文本标签讲解标签

字体标签定义字体的显示效果,有些标签它有独自的语义。

<sub>感谢您对PHP中文网的支持</sub>
Copy after login

语义:定义在浏览器显示下标文本,一般用于化学式的书写

如水的化学式:H2O

实例源代码:

<!DOCTYPE HTML PsubBLbC "-//W3C//DTD HTML 4.01 Transbtbonal//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-eqsubbv="Content-Type" content="text/html; charset=gb2312">
<title>字体文本标签讲解<sub></sub>标签</title>
</head>
<body>
<p>字体文本标签讲解&lt;sub&gt;&lt;/sub&gt;标签</p>
<p>字体标签定义字体的显示效果,有些标签它有独自的语义。<br>
</p>
<p><strong>&lt;sub&gt;标签</strong></p>
<p><sub>&lt;sub&gt;感谢您对PHP中文网的支持&lt;/sub&gt;</sub></p>
<p>语义:定义在浏览器显示下标文本,一般用于化学式的书写</p>
<p>如水的化学式:H<sub><strong>2</strong></sub>O</p>
</html>
Copy after login

html中sub标签的语法结构:

<sub>下标</sub>
Copy after login

html中sub标签的代码实例:

<!DOCTYPE html>
<html>
<head>
<title>HTML 上标 下标实例</title>
</head>
<body>
水的化学式:H<sub>2</sub>O
</body>
</html>
Copy after login

浏览器支持

所有浏览器都支持 标签。

HTML 4.01 与 HTML5之间的差异

无。

以上就是本篇文章关于html sub标签的介绍了,希望看完对大家有点用处。想看更多的标签知识,请看我的相关推荐,还有下一篇关于html sup标签的知识:

html sup和sub标签怎么用?html sup标签和sub标签的定义和用法实例

【小编的相关推荐】

html em标签的作用是什么?标签的区别

html col标签是什么意思?html col标签的使用实例介绍

The above is the detailed content of What is the sub tag in html? Introduction to the definition and use of html sub tags. 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.

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 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

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