How to use CSS Font-weight

Source: Internet
Author: User
If we need a font to be bold, in addition to the last said H tag, what is the method? Today teaches you how to use CSS to manipulate font-weight

CSS bold here refers to the use of the div CSS to control the bold object.

Using CSS Property words

Font-weight

Object values: From 100 to 900, the value of the most commonly used font-weight is bold

Font-weight Parameters:

Normal: the proper font. Equivalent to number 400. Declaring this value will cancel any previous settings

Bold: Bold. Equivalent to number 700. is also equivalent to the role of B objects

bolder:ie5+ Extra Bold

lighter:ie5+ Fine Body

number:ie5+ 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

Detailed basic knowledge Please enter the Font-weight manual in the CSS Manual.

HTML regular Bold Label

The previous HTML tags directly on the object are as follows:

<b></b> or <strong></strong> have the same effect.

To add a bold instance, the code is as follows:

<strong> I was bold </strong><br/><b> I was also bold </b><br/>

I'm not being bold.

Examples of CSS bold basic techniques

CSS Code:

. yangshi1{Font-weight:bold}

. yangshi2{font-weight:800}

Div HTML code:

<span class= "Yangshi1" > I was bold </span><br/>

<span class= "Yangshi2" > I've also been bold </span><br/>

I'm not being bold.

CSS Bold result Demo:

This is done by using CSS to control bold text to add bold objects. So you can use this method to bold a text object by adding bold headings to it.

Summary and Recommendation:

1, in the HTML to the object directly bold can be used <b> or <strong> bold

2, the use of CSS bold objects can be used Font-weight:bold to be bold.

CSS operation Font-weight So many ways, the need for friends can be saved, but also please continue to pay attention to other updates on this site.

Related reading:

How to clear floating in CSS


Tips on using CSS to manipulate border


How link styles are set with CSS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.