{"id":18936,"date":"2020-12-17T15:53:46","date_gmt":"2020-12-17T23:53:46","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=18936"},"modified":"2020-12-18T00:22:00","modified_gmt":"2020-12-18T08:22:00","slug":"html-superscript-subscript","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/","title":{"rendered":"HTML Superscript and Subscript Text And When to Use It"},"content":{"rendered":"\n<p><em>The HTML &lt;sup&gt; tag specifies superscript text. This is text that appears at the top of a line of text. The &lt;sub&gt; tag represents subscript text. This is text that appears at the bottom of a line of text.<\/em><\/p>\n\n\n\n<p>Most of the time when we encounter text, it has a traditional baseline and x-height.<\/p>\n\n\n\n<p>Everything in this text up to this point in this article has a baseline. This baseline is basically the point where an underline would show up if we formatted it with a one, and an x-height. The x-height is the imaginary line where a lowercase letter ends. It gets its name from lowercase x since it fills the space.<\/p>\n\n\n\n<p>In this guide, we&#8217;re going to talk about how to define subscript and superscript in HTML. We&#8217;ll walk through an example of each of these text formatting topics so you can learn to use them in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When is Superscript and Subscript Text Used?<\/h2>\n\n\n\n<p>There are times when we would like to use characters that are a half a character below or above the set text. Subscripts are characters that are set half a character below the text. Superscripts are characters that are set half a character above the text.<\/p>\n\n\n\n<p>In a real-world setting, we use these characters when we\u2019re using math equations, chemical equations, citations or footnotes, for example.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML Supertext<\/h2>\n\n\n\n<p>To make super text in HTML, use the &lt;sup&gt; tag. This tag raises any text enclosed within to the top of the line. The sup tag does not have any tag-specific attributes.<\/p>\n\n\n\n<p>Let&#8217;s take a look at the syntax for this method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;p&gt;4 &lt;sup&gt;2&lt;\/sup&gt; = 16&lt;\/p&gt;<\/pre><\/div>\n\n\n\n<p>We have enclosed the &#8220;2&#8221; character within &lt;sup&gt; tags. This makes the &#8220;2&#8221; appear in superscript. Our code now shows:<\/p>\n\n\n\n<p>4 \u00b2 = 16<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML Subtext<\/h2>\n\n\n\n<p>The HTML &lt;sub&gt; command defines subtext. Subtext refers to text that appears toward the bottom of a line of text.<\/p>\n\n\n\n<p>Consider this syntax:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;p&gt;This is main text. &lt;sub&gt;3&lt;\/sub&gt;&lt;\/p&gt;<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<p>This is main text. \u2083<\/p>\n\n\n\n<p>Like in the super text example, we have not specified any tag attributes for &lt;sub&gt;. To move text into subtext, we enclose that text within a &lt;sub&gt; tag.<\/p>\n\n\n\n<p>Subtext is often used to describe element numbers on the periodic table of elements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML Subtext and Supertext Example<\/h2>\n\n\n\n<p>Let&#8217;s walk through an example of both &lt;sub&gt; and &lt;sup&gt; on an HTML web page. Consider the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot;&gt;\n&lt;head&gt;\n&lt;style&gt;\n \n&lt;\/style&gt;\n   &lt;meta charset=&quot;UTF-8&quot;&gt;\n   &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n   &lt;title&gt;Superscript and Subscript&lt;\/title&gt;\n   &lt;style&gt;\n       sub {\n           vertical-align: sub;\n           font-size: smaller;\n       }\n       sup {\n           vertical-align: super;\n           font: smaller;\n       }\n   &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n   &lt;div style=&quot;text-align:center;&quot; class=&quot;container&quot;&gt;\n       &lt;div&gt;\n           &lt;h3&gt;Superscript&lt;\/h3&gt;\n           &lt;span&gt;E=MC&lt;sup&gt;2&lt;\/sup&gt;&lt;\/span&gt;\n           &lt;br \/&gt;\n           &lt;span&gt;1.7 x 10&lt;sup&gt;4&lt;\/sup&gt;&lt;\/span&gt;\n       &lt;\/div&gt;\n       &lt;div&gt;\n           &lt;h3&gt;Subscript&lt;\/h3&gt;\n           &lt;span&gt;H&lt;sub&gt;2&lt;\/sub&gt;O&lt;\/span&gt;\n           &lt;br \/&gt;\n           &lt;span&gt;&lt;sup&gt;\u20201&lt;\/sup&gt;Ipsum, Lorem. Footnote example, 2020.&lt;\/span&gt;\n       &lt;\/div&gt;\n   &lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre><\/div>\n\n\n\n<p>As you can see, we use <em>&lt;sub&gt;<\/em> and <em>&lt;sup&gt;<\/em> subscript tags and superscript tags to create the effect on the <em>&lt;span&gt;<\/em> HTML element. It comes with some default values:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;style&gt;\n       sub {\n           vertical-align: sub;\n           font-size: smaller;\n       }\n       sup {\n           vertical-align: super;\n           font: smaller;\n       }\n&lt;\/style&gt;\n<\/pre><\/div>\n\n\n\n<p>Both tags use event and global attributes that are available to us in HTML. Basically this means that you can set an event handler on it if someone were to click on the text.<\/p>\n\n\n\n<p>In addition, you can use any of the regular HTML attributes to customize the elements. You can find a list of the regular HTML attributes available to us in the <a href=\"https:\/\/www.w3schools.com\/tags\/ref_standardattributes.asp\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Global Attributes list<\/a> written by W3Schools.<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/repl.it\/@careerkarma\/HTML-Super-and-Subscript?lite=true\" width=\"100%\" height=\"400px\" frameborder=\"0\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The HTML &lt;sub&gt; element adds subtext to a paragraph of text. Subtext appears at the bottom of a line of text. &lt;sup&gt; adds super text to text, which appears at the top of a line of text.<\/p>\n\n\n\n<p>That\u2019s it! You can now successfully create superscripts and subscripts in HTML.<\/p>\n\n\n\n<p>Do you want to learn more about HTML? Check out our complete <a href=\"https:\/\/careerkarma.com\/blog\/learn-html\/\">How to Learn HTML guide<\/a> for expert tips and guidance on top online courses and books.<\/p>\n","protected":false},"excerpt":{"rendered":"The HTML &lt;sup&gt; tag specifies superscript text. This is text that appears at the top of a line of text. The &lt;sub&gt; tag represents subscript text. This is text that appears at the bottom of a line of text. Most of the time when we encounter text, it has a traditional baseline and x-height. Everything&hellip;","protected":false},"author":77,"featured_media":18937,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17281],"tags":[],"class_list":{"0":"post-18936","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-html"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"HTML","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>HTML Tutorials: Superscript and Subscript | Career Karma<\/title>\n<meta name=\"description\" content=\"Sometimes when we write markup we want to use characters that appear above or below the main script. Here\u2019s how to write subscript and superscript in HTML.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML Superscript and Subscript Text And When to Use It\" \/>\n<meta property=\"og:description\" content=\"Sometimes when we write markup we want to use characters that appear above or below the main script. Here\u2019s how to write subscript and superscript in HTML.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-17T23:53:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-18T08:22:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"714\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Christina Kopecky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christina Kopecky\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\"},\"author\":{\"name\":\"Christina Kopecky\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\"},\"headline\":\"HTML Superscript and Subscript Text And When to Use It\",\"datePublished\":\"2020-12-17T23:53:46+00:00\",\"dateModified\":\"2020-12-18T08:22:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\"},\"wordCount\":606,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg\",\"articleSection\":[\"HTML\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\",\"name\":\"HTML Tutorials: Superscript and Subscript | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg\",\"datePublished\":\"2020-12-17T23:53:46+00:00\",\"dateModified\":\"2020-12-18T08:22:00+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\"},\"description\":\"Sometimes when we write markup we want to use characters that appear above or below the main script. Here\u2019s how to write subscript and superscript in HTML.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg\",\"width\":1000,\"height\":714},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML\",\"item\":\"https:\/\/careerkarma.com\/blog\/html\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"HTML Superscript and Subscript Text And When to Use It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\",\"name\":\"Christina Kopecky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg\",\"caption\":\"Christina Kopecky\"},\"description\":\"Christina is an experienced technical writer, covering topics as diverse as Java, SQL, Python, and web development. She earned her Master of Music in flute performance from the University of Kansas and a bachelor's degree in music with minors in French and mass communication from Southeast Missouri State. Prior to joining the Career Karma team in June 2020, Christina was a teaching assistant, team lead, and section lead at Lambda School, where she led student groups, performed code and project reviews, and debugged problems for students. Christina's technical content is featured frequently in publications like Codecademy, Repl.it, and Educative.\",\"sameAs\":[\"http:\/\/www.linkedin.com\/in\/cmvnk\"],\"url\":\"https:\/\/careerkarma.com\/blog\/author\/christina-kopecky\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"HTML Tutorials: Superscript and Subscript | Career Karma","description":"Sometimes when we write markup we want to use characters that appear above or below the main script. Here\u2019s how to write subscript and superscript in HTML.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/","og_locale":"en_US","og_type":"article","og_title":"HTML Superscript and Subscript Text And When to Use It","og_description":"Sometimes when we write markup we want to use characters that appear above or below the main script. Here\u2019s how to write subscript and superscript in HTML.","og_url":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-12-17T23:53:46+00:00","article_modified_time":"2020-12-18T08:22:00+00:00","og_image":[{"width":1000,"height":714,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg","type":"image\/jpeg"}],"author":"Christina Kopecky","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Christina Kopecky","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/"},"author":{"name":"Christina Kopecky","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e"},"headline":"HTML Superscript and Subscript Text And When to Use It","datePublished":"2020-12-17T23:53:46+00:00","dateModified":"2020-12-18T08:22:00+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/"},"wordCount":606,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg","articleSection":["HTML"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/","url":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/","name":"HTML Tutorials: Superscript and Subscript | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg","datePublished":"2020-12-17T23:53:46+00:00","dateModified":"2020-12-18T08:22:00+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e"},"description":"Sometimes when we write markup we want to use characters that appear above or below the main script. Here\u2019s how to write subscript and superscript in HTML.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/FBxthCpLbkNQGy77OvH9zK99uerD7Q3kAOzOf7ofzlcJkmEkFiIQ2t78nFvSz4WNPpuAWjLjWbk2prTVhs0fuf3kbiOE2MLmSsntY9U7jSv0CMhZbno0GKRP7Fn_wqXYdkeiRO-aoZ01lxvhCd-yhos8OyClOrK1IBytBkcGVCuNUGCAQ7gs2048.jpg","width":1000,"height":714},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/html-superscript-subscript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"HTML","item":"https:\/\/careerkarma.com\/blog\/html\/"},{"@type":"ListItem","position":3,"name":"HTML Superscript and Subscript Text And When to Use It"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e","name":"Christina Kopecky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg","caption":"Christina Kopecky"},"description":"Christina is an experienced technical writer, covering topics as diverse as Java, SQL, Python, and web development. She earned her Master of Music in flute performance from the University of Kansas and a bachelor's degree in music with minors in French and mass communication from Southeast Missouri State. Prior to joining the Career Karma team in June 2020, Christina was a teaching assistant, team lead, and section lead at Lambda School, where she led student groups, performed code and project reviews, and debugged problems for students. Christina's technical content is featured frequently in publications like Codecademy, Repl.it, and Educative.","sameAs":["http:\/\/www.linkedin.com\/in\/cmvnk"],"url":"https:\/\/careerkarma.com\/blog\/author\/christina-kopecky\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=18936"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18936\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18937"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=18936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=18936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=18936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}