html, css text bold method

There are two general methods leading end bold font, a bold method html tag, another method is css bold, there is a method bold font. The first two are the most commonly used method, after a bit of a feeling of non-mainstream way, do not know how I think of this approach, a little sad for his intelligence, Here to explain in detail.

First, the method of bold text label

1, h (1 ~ 6 tag) Notation

<h1> h1 tag -> CGLweb distal </ h1 of>
<H2> H2 tag -> CGLweb distal </ H2>
<H3> H3 tag -> CGLweb distal </ H3>
<H4> H4 tag -> CGLweb distal </ H4>
<H5> tag H5 -> CGLweb distal </ H5>
<H6> tag H6 -> CGLweb distal </ H6>
2, the results page

h1 tag -> CGLweb distal
h2 tag -> CGLweb distal
h3 tag -> CGLweb distal
h4 tag -> CGLweb distal
h5 tag -> CGLweb distal
h6 tag -> CGLweb distal

2, strong tag

<strong> strong tag -> CGLweb distal </ strong> (www.gendan5.com)
strong tab -> CGLweb distal

3, b label

<b> b tab -> CGLweb distal end </ B>
B tag -> CGLweb distal

This is where we generally use strong bold to the following reasons, b tag is now obsolete label, so we would not have had.

h tags are generally used in the SEO optimization, so unless it is a list of secondary menu, the details except the title page is not recommended.

Because some browsers h text label defined sample sizes, so we order the same text on every browser size, is set as the fon-size.

Two, CSS method bold text

There are a css property text in bold

font-weight:normal|bold|bolder|lighter|inherit|

1, normal: default. Character defined criteria.

2, bold: the definition of bold characters.

3, bolder: define more coarse character.

4, lighter: define the finer character.

5, numbers: | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 defined characters from coarse to fine. 400 is equivalent to the normal, and is equivalent to 700 bold.

6, inherit: inherited font weight from the provisions of the parent element.

1, css notation is this:

<style type = "text / CSS">
.p_text_1 {font-weight: Normal;}
.p_text_2 {font-weight: Bold;}
.p_text_3 {font-weight: Bolder;}
.p_text_4 {font-weight: Lighter;}
{font-weight .p_text_5: 700;}
.p_text_6 {font-weight: the inherit;}
</ style>
2, the results page may try their own

In fact, the feeling of values ​​and attributes of various css bold, in my eyes 24K alloy to observe a moment, and there is no difference, only the difference between bold and not bold it, want to know fellow pointing or two.

Second, the font bold method

1, writing style

<p style = "font-family : ' Times New Roman';"> CGLweb front end -> font-family: 'Times New Roman' </ P>
<p style = "font-family : ' blackbody';"> CGLweb front end -> font -family: 'blackbody' </ P>
<P style = "font-Family: 'Impact';"> CGLweb front end -> font-Family: Impact </ P>
<P style = "font-Family: 'Arial' ; "> CGLweb front end -> font-family: 'Arial' </ P>
<P style =" font-Family: 'Microsoft elegant black'; "> CGLweb front end -> font-family: 'Microsoft yahei' </ the p->
2, page effect

CGLweb front end -> font-family: 'italics'

CGLweb front end -> font-family: 'blackbody'

CGLweb front end -> font-family: Impact

CGLweb front end -> font-family: 'Arial'

CGLweb front end -> font-family: 'Microsoft elegant black'

This method is used in a long time ago, mainly used in English would be a good point, you will be able to see the font Impact bold know how powerful it is.

Chinese characters, then considering that the reason for missing fonts on your computer is not recommended, it has not yet been used in Chinese characters.

Guess you like

Origin blog.51cto.com/14513127/2436799