Home  >  Article  >  Web Front-end  >  HTML tags superscript and subscript

HTML tags superscript and subscript

零下一度
零下一度Original
2017-06-07 14:17:093448browse

When editing text, especially when editing chemistry questions or test papers, you need to set superscripts or subscripts for certain characters. For example, H2O is the molecular formula of water, and 2O2- is two oxygen ions. For subscripts, the common method is: first select these characters, then modify the "Font" size, and then click the "OK" button; for superscripts, there is often nothing you can do. The following blog log HTML tag code can be modified to make it beautiful and easy to read.
                                                                                                                                                                                                --                          For example: if it is required to display: 2 oxygen ions, it needs to be written as: 2O2- in the html code. Content contained within the tag and its closing tag
will be displayed at half the height of the characters in the current text stream, but with the same font and The font sizes are all the same.
Tip: This tag is useful for adding footnotes to documents and for representing exponent values ​​in equations. If used in conjunction with the tag, it can create a great hyperlink footer.

HTML tag: subscript

In HTML language, the tag can define subscript text. For example: it is required to display: 2 in H20 is the lower mark. In the html code, it needs to be written as: H20. Content contained in the tag and its closing tag
will be displayed at half the height of the characters in the current text stream, but with the same height as the characters in the current text stream. The font and size are the same.

The above is the detailed content of HTML tags superscript and subscript . For more information, please follow other related articles on the PHP Chinese website!