HTML TEXT FORMATTING 



HTML Text Formatting क्या है?

HTML Formatting बेहतर दिखने और Feel करने के लिए Text को Format करने की एक Process हैं। HTML, हमें CSS का उपयोग किए बिना Text को Format करने की क्षमता प्रदान करता है।

HTML में विशेष अर्थ के साथ Text को परिभाषित करने के लिए कई Elements हैं।

HTML में कई Formatting Tag हैं। इन Tag का उपयोग Text को bold, italic या underline करने के लिए किया जाता है।

निम्नलिखित HTML Text Formatting की सूची है:

  • <b> - Bold text
  • <strong> - Important text
  • <i> - Italic Text
  • <u> - Underline Text
  • <em> - Emphasized Text
  • <mark> - Marked Text
  • <small> - Smaller Text
  • <del> - Deleted Text
  • <big> - Conventional Unit (Increase Size or Larger Text)
  • <ins> - Inserted Text
  • <sub> - Subscript Text
  • <sup> - Superscript Text
  • <tt> - Teletype Text (HTML5 में Supported नहीं हैं)
  • <strike> - Strikethrough Text (HTML5 में Supported नहीं हैं)


HTML <b> Element:

HTML <b> Element, बिना किसी अतिरिक्त महत्व के bold text को परिभाषित करता हैं।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

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

</body>
</html>

OUTPUT:

"This Text is bold", This Text is Normal.


HTML <strong> Element:

HTML <strong> Element Text को मजबूत महत्व के साथ परिभाषित करता है। अंदर  के Content आमतौर पर bold में Display किया जाता है।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p><strong>"This is an Important content",</strong> and this is Normal content.</p>

</body>
</html>

OUTPUT:

"This is an Important content" and this is normal content.


HTML <i> Element:

HTML <i> Element Physical Element है, जो किसी भी अतिरिक्त significance के बिना, italic font में Content को प्रदर्शित करता है। 

यदि आप <i> ………… </ i> Element के भीतर कुछ भी लिखते हैं, तो इटैलिक (Italic) अक्षरों में दिखाया जाता हैं।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p> <i> "This text is italic", </i> and this text is normal.</p>

</body>
</html>

OUTPUT:

"This text is italic", and this text is normal.

HTML <em> Element:

HTML <em> Element एक Logical Element है, जो Semantics Importance के साथ italic font में content को Display करेगा।

यदि आप <em> ………… </em> Element के भीतर कुछ भी लिखते हैं, तो इटैलिक (Italic) अक्षरों में दिखाया जाता हैं।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p> <em> "This is an important content" </em> , which displayed in italic font.</p>

</body>
</html>

OUTPUT:

"This is an important content", which displayed in italic font.

HTML <mark> Element:

यदि आप किसी text को mark या highlight करना चाहते हैं, तो आपको <mark> ……… </ mark> के अंदर content लिखना चाहिए।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p>I want to put a <mark> Mark</mark> on your face</p>

</body>
</html>

OUTPUT:

I want to put a Mark on your face


HTML <small> Element:

यदि आप अपने font size को बाकी text से छोटा (small) रखना चाहते हैं तो content को <small> ……… </ small> Tag के अंदर लिखे।

यह पिछले font size की तुलना में एक font size को कम करता है।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p>Hello <small>Write the paragraph in smaller font.</small></p>

</body>
</html>

OUTPUT:

Hello Write the paragraph in smaller font.

HTML <del> Element:

कुछ भी जो <del> ………. </ del> Tag के अंदर रखा जाता है, उसे deleted text के रूप में Display किया जाता हैं।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p>My Favorite Dish is <del>Paneer</ del> Dal-Batee.</p>

</body>
</html>

OUTPUT:

My Favorite Dish is Paneer Dal-Batee.

                                                          Note: Paneer text is deleted text.                                             


HTML <ins> Element:

कुछ भी जो <ins> ………. </ins> Tag के अंदर रखा जाता है, उसे inserted text के रूप में Display किया जाता हैं।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p> <del> Delete your first paragraph. </del> <ins> Write another paragraph. </ins> </p>

</body>
</html>

OUTPUT:

Delete your first paragraph. Write another paragraph.


HTML <u> Element:

कुछ भी जो <u> ………. </u> Tag के अंदर रखा जाता है, उसे underline text के रूप में Display किया जाता हैं।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p><u>Write Your First Paragraph in underlined text.</u></p>

</body>
</html>

OUTPUT:

Write Your First Paragraph in underlined text.


HTML <sub> Element:

यदि आप Content को <sub> ………….. </sub> Tag के अंदर रखते हैं, तो इसे subscript में दिखाया जाता है; इसका अर्थ है कि यह अन्य characters के नीचे एक character की ऊँचाई को आधा प्रदर्शित करता है।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p>Hello <sub>Write Your First Paragraph in subscript.</sub></p>

</body>
</html>

OUTPUT:

Hello Write Your First Paragraph in subscript.

HTML <sup> Element:

यदि आप Content को <sup> ………….. </sup> Tag के अंदर रखते हैं, तो इसे subscript में दिखाया जाता है; इसका अर्थ है कि यह अन्य characters के ऊपर एक character की ऊँचाई को आधा प्रदर्शित करता है।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p>Hello <sup>Write Your First Paragraph in superscript.</sup></p>

</body>
</html>

OUTPUT:

Hello Write Your First Paragraph in superscript.

HTML <big> Element:

यदि आप अपने font size को बाकी text से बड़ा (big) रखना चाहते हैं तो content को <big> ……… </ big> Tag के अंदर रखें। यह पिछले font size एक point font size को बढ़ाता है।

उदाहरण:

<!DOCTYPE html>
<html>
<body>

        <p>Hello <big>Write Your First Paragraph in Larger Text.</big></p>

</body>
</html>

OUTPUT:

Hello Write Your First Paragraph in Larger Text.