Basic Text Formatting
This is strong/important text (semantic emphasis).
This is emphasized text (semantic emphasis).
This is bold text (visual formatting only).
This is italic text (visual formatting only).
This is underlined text.
This is small text for fine print.
This is highlighted/marked text for emphasis.
Subscript and Superscript
Water formula: H2O (subscript example)
Einstein's equation: E = mc2 (superscript example)
Chemical formula: C6H12O6
Mathematical expressions: x2 + y2 = z2
Semantic Text Elements
Visit our website at https://example.com
The WWW was invented by Tim Berners-Lee.
According to The Art of Computer Programming by Donald Knuth...
Use the console.log()
function to debug JavaScript.
The variable x represents the unknown value in the equation.
Press Ctrl + C to copy the selected text.
This article was published on .
The meeting is scheduled for .
Generic Containers
This paragraph contains a styled span element for inline formatting.
You can use span elements to apply CSS classes to inline content.
Complex Examples
The chemical compound H2SO4 (sulfuric acid) has a molecular weight of approximately 98.08 g/mol.
Important: The API requires authentication
tokens. Press F12 to open developer tools.
Remember: Always backup your data before running the rm -rf
command!
According to MDN Web Docs, the innerHTML property gets or sets the HTML markup contained within the element.
Tags Summary
This page demonstrates all inline text formatting tags:
<a>
- Anchor/link elements<strong>
- Strong importance (semantic)<em>
- Emphasized text (semantic)<b>
- Bold text (presentational)<i>
- Italic text (presentational)<u>
- Underlined text<small>
- Small text<mark>
- Highlighted/marked text<sub>
- Subscript text<sup>
- Superscript text<abbr>
- Abbreviations<cite>
- Citations<code>
- Code snippets<span>
- Generic inline container<time>
- Time/date elements<var>
- Variables<kbd>
- Keyboard input