HOW TO CREATE BOLD TEXT IN HTML

Ways To Make Text Appear Bold In HTML

In HTML, formatting text or website content in bold requires a simple line of code. Therefore, in the following example, a demo text has been implemented as a heading, followed by a line of common text in bold and another line of code with another bold text, which is displayed as a universal text in bold by all web browser applications.

<!DOCTYPE html>

<head>

<title>HTML Demo</title>

<body>

<h1><center>Sample Heading In Bold</center></h1>

<b>This is a sample text in bold.</b><br>

<br><strong>This is another sample text in strong.</strong>

</body>

</html>

In the example given above, the <h1>, <b> and <strong> tags represent bold texts in HTML. The ‘<h1>’ tag is used for displaying main heading in bold text. The ‘<b>’ tag is used for displaying general text in bold. The ‘<strong>’ tag enforces the web browser application to display website text or contents in bold.

So, if you plan on designing and developing a new website using the HTML markup language, you will certainly get used to it very quickly.

Make Text Bold With CSS

Cascading Style Sheets (CSS) is a consistent way of adding styles to web pages. CSS focuses more on the visual appearance of web pages and its websites, while being embedded in the HTML markup language.

Creating bold text using CSS in HTML can be achieved by following the example given below:

<span>This text is displayed in bold.</span>

Thus, in the above example, using the ‘<span>’ tag in CSS compels the web browser application to display text in the given tag and minimising the amount of variation.

Another way of creating a bold text is through using inline CSS. See the example given below:

<span style=”font-weight:bolder”>This text is made bold with inline CSS.</span>

The purpose of this inline CSS is to make text much thicker than is usually displayed in web pages.

However, you can also create a text with normal thickness. The format for creating text in normal thickness is given as follows:

<span style=”font-weight:normal”>This text has normal thickness in contrast to heavy thickness.</span>

As you can see from the examples given above, it is not a difficult task to create text in bold using both HTML and CSS.

Get More Solutions At Codexoxo

The HTML experts at Codexoxo are certified and have in-depth knowledge and skills in the markup language. You can, therefore, avail solutions and support services in order to make your experience with HTML much better. Our team of qualified experts can help you improve your skills in HTML, so that you can easily design and create impressive website having complete functionality.

Get the best solutions, consultation and support services for HTML at Codexoxo. Talk to our certified experts today! Dial <enter-phone-number> and get help right away!

If you have any questions with regards to HTML and CSS, feel free to speak with our experts any time you find convenient. Avail all the help you want by getting in touch with our certified experts on the toll-free support phone number <enter-phone-number>.

Call Now