HTML Formatting Tags

M2-R5.1 · Chapter 3: HTML Basics · 3 min read

HTML FORMATTING TAGS

नोट: छात्र, इन सभी tags का उपयोग करके computer पर HTML page बनाएं और जो output आए, उसे भी अपनी copy में लिखें।


1. Bold Tag (<b>)

  • यह text को bold दिखाता है।

  • इसका उपयोग केवल text को bold करने के लिए किया जाता है, इसमें कोई special importance नहीं होती।

Syntax:

<b>content</b>

Example:

<p>This is <b>bold text</b>.</p>

2. Italic Tag (<i>)

  • यह text को italic style में display करता है।

Syntax:

<i>content</i>

Example:

<p>This is <i>italic text</i>.</p>

3. Underline Tag (<u>)

  • यह text के नीचे line दिखाता है।

Syntax:

<u>content</u>

Example:

<p>This is <u>underlined text</u>.</p>

4. Strike-through Tag (<strike>)

  • यह text के बीच से एक line दिखाता है।

Syntax:

<strike>content</strike>

Example:

<p>This is <strike>strike text</strike>.</p>

5. Big Tag (<big>)

  • यह text का font size बढ़ाता है।

Syntax:

<big>content</big>

Example:

<p>This is <big>big text</big>.</p>

6. Small Tag (<small>)

  • यह text का font size कम करता है।

Syntax:

<small>content</small>

Example:

<p>This is <small>small text</small>.</p>

7. Mark Tag (<mark>)

  • यह text को highlight करता है।

Syntax:

<mark>content</mark>

Example:

<p>This is <mark>highlighted text</mark>.</p>

8. Superscript Tag (<sup>)

  • यह text को normal text से थोड़ा ऊपर display करता है।

  • इसका उपयोग powers आदि लिखने के लिए किया जाता है।

Syntax:

<sup>content</sup>

Example:

<p>2<sup>3</sup> = 8</p>

9. Subscript Tag (<sub>)

  • यह text को normal text से थोड़ा नीचे display करता है।

  • इसका उपयोग formulas आदि लिखने के लिए किया जाता है।

Syntax:

<sub>content</sub>

Example:

<p>H<sub>2</sub>O</p>

10. Quote Tag (<q>)

  • यह short quotation को define करता है।

Syntax:

<q>content</q>

Example:

<p>He said, <q>HTML is fun.</q></p>

11. Blockquote Tag (<blockquote>)

  • यह long quotation को define करता है।

  • इसका content सामान्यतः indented text के रूप में दिखाई देता है।

Syntax:

<blockquote>content</blockquote>

Example:

<blockquote>
HTML stands for HyperText Markup Language.
</blockquote>

12. Deleted Text Tag (<del>)

  • यह deleted text को दिखाता है।

  • Deleted text के ऊपर strikethrough line दिखाई देती है।

Syntax:

<del>content</del>

Example:

<p>This is <del>wrong</del> correct.</p>

13. Teletype Tag (<tt>)

  • यह text को monospaced (typewriter-style) font में display करता है।

Syntax:

<tt>content</tt>

Example:

<p>This is <tt>teletype text</tt>.</p>

14. Preformatted Text Tag (<pre>)

  • यह text को लगभग उसी तरह display करता है जिस तरह वह HTML code में लिखा गया है।

  • यह spaces और line breaks को preserve करता है।

Syntax:

<pre>
Line 1
Line 2
Line 3
</pre>

Example:

<pre>
* HTML
* CSS
* JAVA
</pre>

15. Abbreviation Tag (<abbr>)

  • यह किसी abbreviation या acronym को define करता है।

  • title attribute की सहायता से abbreviation की पूरी information दी जा सकती है।

Syntax:

<abbr title="HyperText Markup Language">HTML</abbr>

Example:

<p>
<abbr title="Cascading Style Sheets">CSS</abbr>
is used for styling.
</p>

16. Font Tag in HTML (<font>)

  • <font> tag का उपयोग text के font size, color और face को define करने के लिए किया जाता है।

Syntax:

<font size="5" color="red" face="Arial">
    content
</font>

Example:

<p>
<font color="red">This is red text.</font>
</p>

Attributes of <font> Tag

<font> tag के मुख्य attributes निम्नलिखित हैं:

AttributeValueDescriptionExample
size1 से 7 या relative value जैसे +1, -2यह text के size को set करता है। इसका default size 3 होता है।<font size="4">Hello World!</font>
colorColor nameयह text का color set करता है।<font color="blue">Hello World!</font>
faceFont family name जैसे Arialयह text के लिए font family define करता है।<font face="Arial">Hello World!</font>

Example:

<font size="4" color="blue" face="Arial"> Hello World! </font>

इस example में:

  • size="4" → text का size set करता है।

  • color="blue" → text का color blue करता है।

  • face="Arial" → text का font Arial करता है।