CSS Introduction

CSS Tutorial What is CSS CSS Syntax CSS Selector How to include CSS CSS Comments

CSS Attributes

CSS Background CSS Border CSS Display CSS Float CSS Font CSS Color CSS Hover CSS Important CSS Line-height CSS Margin CSS Opacity CSS Filter CSS Images CSS Overflow CSS Padding CSS Position CSS Vertical align CSS White space CSS Width Word-wrap in CSS Box-shadow in CSS Text-transform in CSS CSS Outline CSS Visibility CSS Counters CSS Clear fix CSS Icons CSS Justify-content Text-decoration in CSS CSS Lists CSS nth selector CSS Sticky CSS Background-clip CSS Checkbox-style CSS Letter-spacing CSS Navigation bar CSS Overlay CSS Root CSS Specificity CSS Text-indent CSS Text-stroke CSS Zoom CSS Order CSS Descendent selector CSS Clip CSS calc() CSS Background-blend-mode CSS radio-button CSS Superscript and subscript CSS Text-effects CSS Text-align CSS Variables CSS Page-break-before CSS Page-break-inside CSS Page-break-after CSS Content property CSS Word-spacing CSS Animation CSS @keyframes rules CSS Pseudo-classes CSS Pseudo-elements CSS Radial-gradient CSS Translate CSS Gradients CSS z-index CSS Loaders CSS Units CSS Transition CSS Masking CSS Arrow CSS Pagination

Questions

What is Bootstrap CSS What is CSS used for How to center a table in CSS What is a CSS File How to center a button in CSS How to change background color in CSS How to change the font in CSS How to change font size in CSS How to resize an image in CSS How to get rid of bullet pioints in CSS Is CSS a programming language How to edit CSS in WordPress How to use google fonts in CSS How to create blinking text using CSS How to Set Space between the Flexbox Is CSS a Programming Language

Difference

Difference between HTML and CSS Grid Vs Flexbox in CSS Difference between CSS Grid and CSS Flexbox

Misc

Create a 3D text effect using HTML and CSS Hover condition for a:before and a:after in CSS Bem CSS Boder Types CSS Features of CSS Font Face CSS Image Overlay CSS B Tag CSS Carousel CSS CSS Arrow CSS Focus Flex Grow in CSS Bem CSS Features of CSS Font Face CSS Removing Underline from Link in CSS Width Property in CSS Radio Button in CSS

B Tag CSS

To format text in bold, we"utilize the HTML "b" tag, which is also"referred to as the "<b>" element. Making text look thicker or darker than nearby text is an easy method to make it stand out. However, it's important to note that the `<b>` tag is a presentational element and needs to be utilized sparingly, as it primarily focuses on the visual appearance of text rather than its semantic meaning.

The HTML "<b>" tag can be used as shown below:

<p>This is <b>bold</b> text.</p>

The word "bold" will be written in a bold font in this example.

Due to the separation of information and presentation in best practices for web development, the significance of the "<b>" tag has decreased over time. It is often advised to utilize CSS (Cascading Style Sheets) to alter the look of text and other HTML components rather than the "<b>" tag for styling. Thanks to CSS's increased flexibility and control, you may change fonts, colours, and other visual elements.

Here is an illustration of the bold text created with CSS:

Example: 1

<!DOCTYPE html>

<html>

  <head>

    <title>Title of the document </title>

    <style>

      .bold-text {

        font-weight: 700;

      }

    </style>

  </head>

  <body>

    <p>

      <span class="bold-text">This section of the text </span>

      has been extracted in bold.

    </p>

  </body>

</html>

Output:

B Tag CSS

Example: 2

<!DOCTYPE html>

<html>

<body>

            <h1>Javatpoint</h1>

            <h3>HTML b tag</h3>

            <!--paragraph Tag -->

            <p>This is normal paragraph Tag text</p>

            <!--bold Tag -->

            <b>This is bold Tag text</b>

</body>

</html>

Output:

B Tag CSS

This example shows how to make text bold by defining the CSS class "bold-text" and applying it to a "<span>" element. This strategy separates the presentation from the information and is more consistent with current web development techniques.

In conclusion, although the "<b>" tag may be utilized for straightforward text formatting, it's typically advised to use CSS for style to get more control and maintainability in web development. CSS makes it simpler to adjust the styling across your website and enables you to uniformly apply different styles to components across your site.