From the course: HTML Essential Training
Schalten Sie den kompletten Kurs noch heute frei
Join today to access over 23,300 courses taught by industry experts.
Superscripts, subscripts, and small text - HTML Tutorial
From the course: HTML Essential Training
Superscripts, subscripts, and small text
- Let's talk about another situation where you need to mark up certain bits of content as having a different meaning than the rest. Subscripts, superscripts, and small text. Subscripts are characters that are set below the normal baseline for text. Did you ever take a chemistry class and learn how to write the formula for water, H2O, where the two is lowered down than the H and the O? The two character is typeset as a subscript. It's set lower down. Superscripts are characters that are set above the normal baseline of text. Mathematical formulas have lots of superscripts, like five squared. Or in footnotes, the little marker for a footnote is a superscript. To mark up subscripts and superscripts, we'll use the sub and sup elements. H2O looks wrong like this. I'll wrap the two in its sub-element, and now it drops down below the baseline and gets a little smaller. Next, let's format this number for the footnote.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.