Activity 3 - HTML Tags Class - 8
Activity 3 - HTML Tags
HTML Tags with Explanations and Final Code.
1. Text Formatting Tags
- <b> - Makes text bold. Example: Bold text
- <i> - Makes text italic. Example: Italic text
- <strong> - Strong importance (bold + semantic meaning). Example: Important
- <em> - Emphasis (italic + semantic meaning). Example: Emphasized
- <u> - Underlined text. Example: Underlined
- <small> - Smaller text. Example: Small text
- <mark> - Highlighted text. Example: Highlight
- <del> - Deleted text. Example:
Deleted - <strike> - Deprecated strikethrough text. Example:
Strike - <dfn> - Defines a term. Example: HTML
- <p> - Paragraph of text. Example:
This is a paragraph.
- <samp> - Sample output from code. Example: Hello World
2. Position & Script Tags
- <sup> - Superscript (above line). Example: x2
- <sub> - Subscript (below line). Example: H2O
- <wbr> - Word break opportunity. Example: LongWord
Break
3. Special Semantic Tags
- <time> - Date/time. Example:
- <progress> - Progress bar. Example:
4. Heading Tags
- <h1> - Largest heading. Example: Heading 1
Full HTML Code Example (Original Snippet)
<!DOCTYPE html> <html> <head> <title>HTML Tags Example</title> </head> <body> <h1>HTML Tags Example</h1> <p><b>Bold</b>, <i>Italic</i>, <strong>Strong</strong>, <em>Emphasized</em>, <u>Underlined</u>, <small>Small</small>, <mark>Highlighted</mark>, <del>Deleted</del>, <strike>Strike</strike>, <dfn>Definition</dfn></p> <p>x<sup>2</sup> and H<sub>2</sub>O</p> <p>BreakableWord<wbr>Here</p> <p>Date: <time datetime="2025-08-11">Aug 11, 2025</time></p> <p>Progress: <progress value="60" max="100"></progress></p> <p>Output: <samp>Hello World</samp></p> </body> </html>
Comments
Post a Comment