TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML sub Tag

HTML sub Tag with html tutorial, tags, anchor, img, div, entity, textarea, marquee, p tag, heading tag, h1, h2, table, formatting, attribute, elements, ol, ul, Input Types, block element tag, inline element tag, html tags, phrase tag, head, body, form, lists, symbols etc.

<< Back to HTML

HTML <sub> tag

HTML <sub> tag is termed as Subscript tag and which is used to define subscript text. The text within <sub> renders with a lower baseline and with a smaller font than surrounding text font.

The <sub> tag is useful for presenting mathematical formula and chemical formulas such as H2O.

Syntax

    <sub>.........</sub>

Following are some specifications about the HTML <sub> tag

Display Inline
Start tag/End tag Both Start and End tag
Usage Textual

Example

<!DOCTYPE html>
<html>
<head>
	 <title>Sub Tag</title>
	<style>
	 body{
	     text-align: center;
	 }
	 p{
	  color: green;
	 }
	</style>
</head>
<body>
<h2>Example of sub tag</h2>
<p>The chemical formula for Sulphuric acid is: H<sub>2</sub>SO<sub>4</sub></p>
</body>
</html>
Test it Now

Output:

HTML sub tag

Attribute:

Tag-specific attributes:

The <sub> tag does not contain any specific attribute.

Global attribute:

The <sub> tag supports the Global attributes in HTML.

Event attribute:

The <sub> tag supports the Event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<sub>YesYesYesYesYes
Next TopicHTML summary Tag




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf