Download ArticleDownload Article

HTML makes it easy to bold text, and there are several tags you can learn if you want more options. Better yet, you can take a few minutes to learn some basic CSS and add it directly to your HTML document. This is quicker than adding a whole CSS stylesheet, and will give you more control over exactly how thick the bolded text displays.

Method 1
Method 1 of 2:

Creating Bold Text with HTML

Download Article
  1. How.com.vn English: Step 1 <strong>Use the strong tag</strong>.
    In HTML5, the preferred standard, the strong tag is recommended for important text. This is almost always displayed as bold text in browsers.
    • Place the text you want bolded in between these tags: <strong>bold text here</strong>.
  2. How.com.vn English: Step 2 Use heading tags instead when appropriate.
    "Headings" are usually placed at the top of the web page or at the beginning of a new section. Usually, headings are displayed as bold and larger than the regular font, but this can vary. There are six different heading tags, from <h1> to <h6>. Follow these guidelines when using them:
    • The h1 tag, written <h1>Your Heading Here</h1> is the most important heading, typically the largest text at the top of the page.
    • <h2>The h2 tag</h2> is for the second most important heading, and so on down to <h6>h6, the smallest</h6>.
    • Use these sparingly, only to organize your page. Users should be able to skim the headings quickly and find the topic they're looking for.
    • When creating subheadings, move down just one level at a time. In other words, don't skip from <h1> to <h3>. This helps the HTML page preserve its formatting when transferred to another format.[1]
    Advertisement
  3. How.com.vn English: Step 3 <b>Use the b tag as a last resort</b>.
    The <b> tag is still supported in HTML5, but <strong> is preferred in most situations. Use the <b> tag only when the text should be bolded for stylistic reasons, not to add emphasis. Examples include key words or vocabulary words in a passage, or product names in a review.[2]
    • As with most tags, <b>place the affected text between a start tag and an end tag</b>.
  4. Advertisement
Method 2
Method 2 of 2:

Creating Bold Text with Inline CSS

Download Article
  1. How.com.vn English: Step 1 Understand when to use CSS.
    CSS is a more powerful and consistent way to style your web page. This makes it the ideal way to determine how your page looks, while HTML is designed to determine what your page means. It's completely fine to use HTML tags when you want to emphasize important text, but CSS will give you more close control over the visual appearance of your bold text.
    • Try opening a basic HTML page with different browsers, and you might notice differences in the display. CSS tells the browser exactly how to display text altered by a given tag, to minimize the amount of variation.
  2. How.com.vn English: Step 2 Add a <span> tag to your text.
    If you don't know CSS yet, using "inline CSS" is a good way to get started. While you can use this to alter tags such as <p> or <h1>, sometimes you'll want to change text that's not already between tags.[3] In this case, place the text between <span></span> tags. This has no effect on its own, but gives us something to work with. Here's the example we'll be using:
    • <span>I learned how to make this text bold with inline CSS.</span>
  3. How.com.vn English: Step 3 Add the style attribute.
    HTML attributes are written directly in the tag, inside the < >brackets. The style attribute is necessary to insert CSS into the HTML tag, so we'll insert style= into the span tag:
    • <span style=>I learned how to make this text bold with inline CSS.</span>
    • There's no reason to add the style attribute without specifying any styles. We're just taking this one step at a time to make it easy to follow.
  4. How.com.vn English: Step 4 Add the font-weight property.
    CSS properties are added as part of the style attribute. In our case, we'll use the font-weight property, which determines how thick to draw the font. This single property can be used to display bold (extra-thick) text, thin text, or even specify that the text should be displayed with normal thickness. Add "font-weight: " after the = sign, like this:
    • <span style="font-weight: ">I learned how to make this text bold with inline CSS.</span>
    • Again, this is unfinished and won't do anything by itself.
    • Don't forget the quotation marks before and after font-weight:.
  5. How.com.vn English: Step 5 Add the bold value.
    The only thing we need to do now is add a value for font-weight, between the font-weight: and the final quotation mark. There are quite a few options for different amounts of "boldness," but the value bold is the easiest to use :[4]
    • <span style="font-weight:bold">I learned how to make this text bold with inline CSS.</span>
  6. How.com.vn English: Step 6 Experiment with other values.
    CSS gives you many more options than HTML, so you don't need to feel constricted. Here are several alternatives to the "bold" value:[5]
    • <span style="font-weight:bolder">"Bolder" text will always be thicker than the parent element.</span> For example, if you make an entire paragraph "bold," then use "bolder" on an individual sentence inside that paragraph, it will be even thicker.
    • <span style="font-weight:normal">"Normal" text will be displayed as normal even if the span is inside a bold tag.</span>
    • <span style="font-weight:900">You can instead use a number from 100 to 900 to specify thickness. 400 is normal text, while bold text uses a thickness of 700 by default.</span>[6]
  7. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I change the image size?
    How.com.vn English: Acute Viral
    Acute Viral
    Community Answer
    Try adding a width and/or height attribute in the image tag. I would recommend using one or the other so your image doesn't get squashed or stretched.
  • Question
    How do I make one letter bold?
    How.com.vn English: Community Answer
    Community Answer
    You can select the letter with a span element and set the span element to apply a bold face.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      • When using the font-weight property in CSS, only use numerical values that are multiples of 100. Values that are in between will be rounded up.[7]
      • An embedded or external CSS sheet is an even better way to bold text, since it allows you to alter and easily change an entire document at once.
      • Each font only has certain "font weights" available. When using CSS, the closest available font weight to the specified amount is used. This means you won't always see a difference between two thicker than normal font weights.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 17 people, some anonymous, worked to edit and improve it over time. This article has been viewed 92,960 times.
      How helpful is this?
      Co-authors: 17
      Updated: March 12, 2024
      Views: 92,960
      Categories: HTML
      Thanks to all authors for creating a page that has been read 92,960 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement