Introduction to the application of HTML tags superscript sup and subscript sub

Introduction to the application of HTML tags superscript sup and subscript sub
HTML tag: superscript

In HTML, the <sup> tag defines superscript text. For example, if you want to display 2 oxygen ions, you need to write it as 2O<sup>2-</sup> in the HTML code. 2O2-

The content contained in the <sup> tag and its closing tag </sup> will be displayed at half the character height of the current text flow, but with the same font and size as the text in the current text flow.

Tip: This tag is useful for adding footnotes to documents and for indicating exponential values ​​in equations. If used in conjunction with the <a> tag, it can create nice hyperlinked footnotes.

HTML tag: subscript

In HTML, the <SUB> tag defines subscript text. For example: if you want to display: H20, where 2 is the subscript, you need to write it as: H<SUB>2</SUB>0 in the HTML code. H2O

The content contained in the <SUB> tag and its closing tag </SUB> will be displayed at half the character height of the current text flow, but with the same font and size as the text in the current text flow.

<<:  Solve the problem that line-height=height element height but text is not vertically centered

>>:  Vue uses calculated properties to complete the production of dynamic sliders

Recommend

UDP connection object principle analysis and usage examples

I wrote a simple UDP server and client example be...

Tips for using DIV container fixed height in IE6 and IE7

There are many differences between IE6 and IE7 in ...

How to handle long data when displaying it in html

When displaying long data in HTML, you can cut off...

Detailed steps to install Mysql5.7.19 using yum on Centos7

There is no mysql by default in the yum source of...

JavaScript to achieve simple provincial and municipal linkage

This article shares the specific code for JavaScr...

How to use CocosCreator for sound processing in game development

Table of contents 1. Basics of audio playback in ...

Detailed explanation of the basic functions and usage of MySQL foreign keys

This article uses examples to illustrate the basi...

Three Vue slots to solve parent-child component communication

Table of contents Preface Environment Preparation...

How to mount the CD to find the rpm package under Linux

Written in front Sometimes you need to install so...

Steps to install MySQL 5.7 in binary mode and optimize the system under Linux

This article mainly introduces the installation/st...

How to create and run a Django project in Ubuntu 16.04 under Python 3

Step 1: Create a Django project Open the terminal...

React realizes secondary linkage effect (staircase effect)

This article shares the specific code of React to...

How to add configuration options to Discuz! Forum

Discuz! Forum has many configuration options in th...