How To Make Text Bold In HTML? - Tutorialspoint

  • Home
  • Whiteboard
  • Online Compilers
  • Practice
  • Articles
  • AI Assistant
  • Jobs
  • Tools
  • Corporate Training
  • Courses
  • Certifications
Menu Categories Login
  • Switch theme
  • SQL
  • HTML
  • CSS
  • Javascript
  • Python
  • Java
  • C
  • C++
  • PHP
  • Scala
  • C#
  • Tailwind CSS
  • Node.js
  • MySQL
  • MongoDB
  • PL/SQL
  • Swift
  • Bootstrap
  • R
  • Machine Learning
  • Blockchain
  • Angular
  • React Native
  • Computer Fundamentals
  • Compiler Design
  • Operating System
  • Data Structure and Algorithms
  • Computer Network
  • DBMS
  • Excel
Technical Questions and Answers
  • Data Structure Data Structure
  • Networking Networking
  • RDBMS RDBMS
  • Operating System Operating System
  • Java Java
  • MS Excel MS Excel
  • iOS iOS
  • HTML HTML
  • CSS CSS
  • Android Android
  • Python Python
  • C Programming C Programming
  • C++ C++
  • C# C#
  • MongoDB MongoDB
  • MySQL MySQL
  • Javascript Javascript
  • PHP PHP
  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • HR Interview Questions
  • Computer Glossary
  • Who is Who
How to make text bold in HTML? JavascriptWeb DevelopmentFront End Scripts

To make text bold in HTML, use the <b>?</b> tag or <strong>?</strong> tag. Both the tags have the same functioning, but <strong> tag adds semantic strong importance to the text. The <b> tag is a physical markup element, but do not add semantic importance.

Just keep in mind that you can get the same result in HTML with CSS font-weight property.

Example

You can try to run the following code to make text bold in HTML using <strong>?</strong> tag

Live Demo

<!DOCTYPE html><html>    <head>       <title>HTML text bold</title>    </head>    <body>       <h2>Our Products</h2>       <p>Developed 10 <strong>Android</strong> apps till now.</p>    </body></html>

Example

You can try to run the following code to make text bold in HTML using font-weight property

Live Demo

<!DOCTYPE html><html>    <head>       <title>HTML text bold</title>    </head>    <body>       <h1>Tutorialspoint</h1>       <pstyle="font-weight: bold;">Simply Easy Learning</p>    </body></html> Monica Mona Monica Mona Updated on: 2023-09-06T14:16:19+05:30

41K+ Views

Từ khóa » Html Bold Line