Lesson 7: HTML Formatting
Formatting Text Elements
HTML provides special tags to define text with specific meanings, such as bold importance, emphasis, or subscript/superscript positions.
<strong>Important text</strong> and <em>emphasized text</em>
Why & how to use :
Use semantic formatting tags like <strong> and <em> to convey structural importance to search engines and screen readers, rather than purely visual formatting.
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>HTML Formatting</title></head><body> <p>This is <strong>important text</strong> and this is <em>emphasized text</em>.</p> <p>Water chemical formula: H<sub>2</sub>O</p></body></html>