What is HTML Text Formatting with Example?

what is html text formatting?

What is HTML Text Formatting?

HTML Text Formatting HTML Document के भीतर Text की उपस्थिति (Appearance) और Style को Modify करने के लिए उपयोग की जाने वाली विभिन्न Techniques को संदर्भित (Refers) करता है। ये Formatting Option आपको Text के Font, Size, Color, Alignment और अन्य Properties को बदलने की अनुमति देते हैं। यहां कुछ सामान्य रूप से उपयोग किए जाने वाले HTML Text Formatting Tags दिए गए हैं:-

Bold Text

  • HTML<b> और <strong> Formatting Element हैं।
  • HTML <b> Tag एक Physical Element है जो बिना किसी Logical Importance के Text को Bold Font में Display करता है।
  • HTML <strong> Tag एक Logical Element है, जो Text को Bold Font में Display करता है और Browser को इसके Logical Importance के बारे में Inform करता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bold Text</title>
</head>
<body>
    <h1>Physical Tag</h1>
    <p><b>Write Your First Paragraph in bold text. </b></p>
    <h1>Logical Tag</h1>
    <p><strong>This is an important content</strong>, and this is normal content</p>
</body>
</html>

				
			
html bold Text

Italic Text

  • HTML<i> और <em> Formatting Element हैं।
  • HTML <i> Tag Physical Element है, जो बिना किसी अतिरिक्त Importance के Enclosed Content को Italic Font में Display करता है।
  • HTML <em> Tag एक Logical Element है, जो Italic Font में Enclosed Content को अतिरिक्त Semantics Importance के साथ Display करता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Italic Text</title>
</head>
<body>
    <h1>Physical Tag</h1>
    <p><i>Write Your First Paragraph in italic text. </i></p>
    <h1>Logical Tag</h1>
    <p><em>This is an important content</em>, which displayed in italic font.</p>
</body>
</html>

				
			

Mark Text

  • HTML <mark> Tag Mark Text को Define करता है।
  • <mark> Tag का उपयोग Text को Mark करने और Highlight करने के लिए किया जाता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Mark Text</title>
</head>
<body>
    <h3>Write Your First <mark>Paragraph</mark> in Mark text.</h3>
</body>
</html>

				
			
html mark

Underline Text

  • HTML <u> Tag Underline Text को Define करता है।
  • <u> Tag का Use इसके बीच में लिखे गए Text को Underline करने के लिए किया जाता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Underline Text</title>
</head>
<body>
    <h3><u>Write Your First Paragraph in Underline text.</u></h3>
</body>
</html>

				
			
Html underline

Superscript Text

  • HTML <sup> Tag Superscript Text को Define करता है।
  • Superscript Text Normal Line से Half वर्ण (Character) ऊपर दिखाई देता है, और छोटे Font में Render किया जाता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Superscript Text</title>
</head>
<body>
    <h3>Write Your First <sup>Paragraph</sup> in Superscript Text.             </h3>
</body>
</html>

				
			

Subscript Text

  • HTML <sub> Tag Subscript Text को Define करता है।
  • Subscript Text Normal Line से Half वर्ण (Character) नीचे दिखाई देता है, और छोटे Font में Render किया जाता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Subscript Text</title>
</head>
<body>
    <h3>Write Your First <sub>Paragraph</sub> in Subscript Text. </h3>
</body>
</html>

				
			
html subscript

Delete Text

  • HTML <del> Tag Delete Text को Define करता है।
  • Delete Text का उपयोग Delete Text को Display करने के लिए किया जाता है। Browser आमतौर पर हटाए गए Text के माध्यम से एक रेखा खींचेंगे।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Delete Text</title>
</head>
<body>
    <h3><del>Write Your First Paragraph in Delete Text.</del></h3>
</body>
</html>

				
			
html delete

Insert Text

  • HTML <del> Tag Delete Text को Define करता है।
  • Insert Text Add की गई Text को Display करता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Insert Text</title>
</head>
<body>
    <h3>My favorite color is <del>blue</del> <ins>red</ins>. </h3>
</body>
</html>

				
			
html insert

Small Text

  • HTML <small> Tag Small Text को Define करता है।
  • Small Text का उपयोग Font Size को Base Font Size से एक Unit कम करने के लिए किया जाता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Small Text</title>
</head>
<body>
    <h3>My <small>favorite</small> color is <small>red</small>.</h3>
</body>
</html>

				
			
html small

Pretty Text

  • HTML <pre> Tag Pretty Text को Define करता है।
  • Pretty Text एक Fixed-width वाले Font में Display होता है। आमतौर पर इसे Courier Font में Display किया जाता है। यह Space और Line Break दोनों को बनाए रखता है।
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <title>Pretty Text</title>
</head>
<body>
    <h2>Pretty Text</h2>
    <pre>  
        This is a formatted text   
        by using the HTML pre tag. It maintains  
            both space and line break.  
    </pre>
</body>
</html>

				
			
html pre
Facebook
Pinterest
LinkedIn
WhatsApp

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top