{"id":982,"date":"2022-04-30T20:30:45","date_gmt":"2022-04-30T20:30:45","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=982"},"modified":"2023-02-27T12:02:33","modified_gmt":"2023-02-27T12:02:33","slug":"html-sup-tag","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/html-sup-tag\/","title":{"rendered":"HTML Sup Tag"},"content":{"rendered":"\n<p class=\"has-text-align-center\"><strong>Sup Tag (Superscript)<\/strong><\/p>\n\n\n\n<p>At times, we are required to represent some content as superscript. Well, superscript means that it is slightly above the other text. For example, if we want to represent some mathematical equation, or simply if we want to write a square of 4 that is equal to 16, we would simply write 42 = 16. As you can see, the 2 is into the superscript.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"sub and sup tag in html | Lecture 16 | HTML tutorial for beginners\" width=\"696\" height=\"392\" src=\"https:\/\/www.youtube.com\/embed\/34fn3VBm7bw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>If we are required to write something like this into our webpage, we can do so, using the sup tag. Here is an<strong>&nbsp;<\/strong>example &#8211;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Superscript example<\/h3>\n\n\n\n<p><strong>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&#8221;en&#8221;&gt;<br>&lt;head&gt;<br>&lt;meta charset=&#8221;UTF-8&#8243;&gt;<br>&lt;meta http-equiv=&#8221;X-UA-Compatible&#8221; content=&#8221;IE=edge&#8221;&gt;<br>&lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width, initial-scale=1.0&#8243;&gt;<br>&lt;title&gt;Superscript example&lt;\/title&gt;<br>&lt;\/head&gt;<br>&lt;body&gt;<br>&lt;p&gt;This is an equation from Physics : E = MC&lt;sup&gt;2&lt;\/sup&gt;&lt;\/p&gt;<br>&lt;\/body&gt;<br>&lt;\/html&gt;<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"114\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/Using-the-sub-tag-and-the-sup-tag-in-HTML-1.jpg\" alt=\"\" class=\"wp-image-728\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/Using-the-sub-tag-and-the-sup-tag-in-HTML-1.jpg 1023w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/Using-the-sub-tag-and-the-sup-tag-in-HTML-1-300x33.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/Using-the-sub-tag-and-the-sup-tag-in-HTML-1-768x86.jpg 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n<\/div>\n\n\n<p>As you can see, using the sup tag in the above example, we could make that 2 as superscript, as required. If we try to have a look at the output, it comes out to be something like this &#8211;<br>If you are required to have something as a superscript for any reason, you can make use of the sup tag. The thing that you write between &lt;sup&gt; and &lt;\/sup&gt; is going to be in the superscript.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sup Tag (Superscript) At times, we are required to represent some content as superscript. Well, superscript means that it is slightly above the other text. For example, if we want to represent some mathematical equation, or simply if we want to write a square of 4 that is equal to 16, we would simply write [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[123,116],"class_list":{"0":"post-982","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-html-tutorial","7":"tag-html-sup-tag","8":"tag-html-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=982"}],"version-history":[{"count":4,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/982\/revisions"}],"predecessor-version":[{"id":4986,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/982\/revisions\/4986"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}