Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use sup tag and sub tag in HTML

Shulou Source: shulou.com Published: 2022-06-01 07:23:40 10月26日 Update

This article focuses on "how to use sup tags and sub tags in HTML". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use sup tags and sub tags in HTML.

We need to use sup element and sub element to implement superscript and subscript characters in HTML

The sup tag defines superscript text.

The sub tag defines the subscript text.

Let's take a look at the specific usage of the sup element and the sub element

The code is as follows

one

two

three

four

five

six

seven

eight

nine

ten

The third power of 10 is 103

The molecular formula of water is H2O.

The running effect is as follows

It should be noted that the superscript and subscript settings change according to the size of the character, and if the body character becomes larger, the superscript and subscript will also become larger.

And vice versa, so pay attention to the setting of font size when using superscripts and subscripts.

At this point, I believe you have a deeper understanding of "how to use sup tags and sub tags in HTML". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Label superscript subscript element character content size text method learning practical deeper body code usage interest molecule molecular formula and vice versa font Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MariaDB Shulou Technology Microsoft MySQL