To make a bold font in CSS, you shoulduse a number of standard commands. But you can use non-standard options, which give an interesting effect. Bold outline is used to highlight a strictly defined fragment of the text. CSS helps us to assign such a font to any phrase or even a single letter. If you are still using HTML tags to achieve this effect, you need to rethink your views on programming, because cascading style sheets give you more possibilities as a developer. We'll talk about some of them in this article.
Assignment
Bold CSS font is assigned with a simplerules: font-weight. As a value, you can specify different combinations. For example, you can write a "font-weight: bold" property, which means a boldface. The standard value is "normal". In addition to keywords, you can use ordinary numbers. Conditional units range from 100 to 900, where 400 corresponds to the command "normal". And this means that if you set the value to less than 400, the font will lose its saturation, and if more, it will get a fat look. This allows you to manually adjust the outline.
In CSS, a bold font can be assigned based onthe parent element. In cascading tables, there are two commands ("bolder" and "lighter") that can increase or decrease the saturation of the outline. The values will vary depending on the parent element. The property "font-weight" can be written in a brief form - "font", where you can write down all the characteristics of the font.
goal
You can assign such a CSS font to any elementHTML or XHTML. The effect will be visible only if the tag contains text. In HTML, there is an analogue to the "font-weight" property. If you put text between the tags, it will become more saturated. Its property is completely identical to the value of "bold". Some developers do not see the difference between the tag and the CSS bold font. But there are differences. The tag has its own meaning, it is used for really important information. A CSS property is just a decorative value used to decorate a text. Let this difference and is not felt when reading, but, as advised by the consortium of the World Wide Web, everything should stand in its place. This order in the code will increase the life of your pages. It's not far off that time when browsers will learn to use another way of text visualization, where the semantic and decorative meaning will be highlighted. Do not forget about this when creating your own pages.
Conclusion
The existing in CSS boldface allowsReduce the source code of the page. There is no need to use the tag. It's enough just to conclude the necessary text in a certain class. And if you need to cancel the boldface, you just need to fix one file with cascading tables. But do not forget that you should not abuse this property, as excessive use of various decorative techniques can spoil the text. It is advisable to use bold type only when it really is needed, for example, to highlight the headings or the name of a particular section.