How to write bold text using html tags using css

नमस्कार दोस्तों! इस लेख में हम पढ़ेंगे How to write bold text using html tags using css के बारे में इसके साथ साथ हम आपको कोड भी दे रहे होंगे।

How to write bold text using html tags using css

किसी भी text को bold करने के बहुत से तरीके है आईये हम उसके बारे में बात करते है:

<b> or <strong> tag का use करके

<b>This text is bold.</b>
<strong>This text is bold and important.</strong>

CSS का use करके

इसका use भी दो तरीके से किया जाता है :

  • Inline CSS
<span style="font-weight: bold;">This text is bold.</span>
CSS

  • Internal or External CSS:
<style>
  .bold-text {
    font-weight: bold;
  }
</style>

<p class="bold-text">This text is bold.</p>

आईये अब इसे एक अच्छे से example से समझने का प्रयास करते है।

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bold Text Example</title>
    <style>
        /* External CSS to make text bold */
        .bold-text {
            font-weight: bold;
        }
    </style>
</head>
<body>

    <!-- Using the <b> tag -->
    <p><b>This text is bold using the &lt;b&gt; tag.</b></p>

    <!-- Using the <strong> tag -->
    <p><strong>This text is bold using the &lt;strong&gt; tag.</strong></p>

    <!-- Using inline CSS -->
    <p><span style="font-weight: bold;">This text is bold using inline CSS.</span></p>

    <!-- Using a CSS class -->
    <p class="bold-text">This text is bold using an external CSS class.</p>

</body>
</html>
इसे भी पढ़े: HTML Formatting tag in Hindi in detailes

How to write bold text using HTML tags?

इसका जवाब ऊपर दे दिया गया है। ऊपर दिए गए जानकारी को एक बार फिर से पढ़े।

या फिर निचे दिए गए video को देखे।

By- Vijay CompEducation
हम आशा करते है की आपको आपके सवाल How to write bold text using html tags using css का जवाब मिल गया होगा। 

इसे भी पढ़े:

Leave a comment