Can I use other tags for bold text?

QuestionsQuestions8 SkillsProHTML Text FormattingNov, 04 2025
059

Yes, you can use other tags for bold text. Instead of the <b> tag, you can use the <strong> tag, which not only makes the text bold but also indicates its importance for search engines. Here's an example:

<body>
 <p>This is <strong>important</strong> text.</p>
</body>

Additionally, you can use CSS to style text as bold. For example:

<style>
 .bold {
   font-weight: bold;
 }
</style>

<body>
 <p>This is <span class="bold">bold</span> text using CSS.</p>
</body>

Using the <strong> tag or CSS is generally preferred over the <b> tag for better semantic meaning.

0 Comments

no data
Be the first to share your comment!