Quickly learn how to make bold text in html and learn how to highlight your main idea in an article

How to make a font bold using the font-weight CSS property

Don't know how to make text bold in CSS? CSS provides us with a special property, font-weight, which allows us to make CSS bold.

Let's take a look at the following example:

An example of bold text using CSS... ...as well as bolding an entire paragraph.

An example of bold text using CSS... ...as well as bolding an entire paragraph.

This property can also be used to specify text density. Plus, you can identify text that you don't want to highlight.

The example above uses inline styles. But I strongly recommend that you use external files and CSS classes, as this will help apply consistent styling to all pages of the site at the same time.

Bold font as a way to highlight the main thing

Words highlighted in bold font look brightest and catchiest. Such words and phrases immediately catch the eye. So, in order to learn how to quickly highlight the necessary places in the text, you should remember a special HTML code. Bold font is set using a paired tag.

Before the word or phrase or sentence that should be highlighted, an opening tag is placed . After the last letter of the text that should be highlighted, a closing tag is placed

. Anything between these two tags will appear in bold when displayed in the browser.

Making text bold using the bold font tag in html

Most people familiar with the language of hypertext, when they see bold HTML font, immediately think of the tag.

Let's look at an example of how to make text bold in HTML using the tag:

An example of bold text using an HTML tag... ...as well as bolding an entire paragraph.

An example of bold text using an HTML tag... ...as well as bolding an entire paragraph.

An HTML tag is the fastest way to make text bold.

Bold text in HTML

To highlight certain text in bold, special HTML tags are used - and . For example the following code:

Plain text. Thumbnail
.
Bold text is strong .

Plain text.
Thumbnail.

Bold text strong.

The output gives the following picture:

The last two options visually look the same, but they are slightly different from each other. The tag sets a simple stylistic highlighting of the word in bold, while adding some kind of semantic “reinforced” (important) meaning. That is, the last line is not just bold text, but some important information. In principle, it is recommended to use .

You can also see bold font written into HTML using styles:

Example of bold text. Example of text with a bold word.

Example of bold text.
Example of text with a bold word.
On the website it is displayed like this:

Although the bold text code for HTML works correctly, it should not be done this way. All design styles must be included in the CSS file. So in the example above you had to for tags

and indicate the appropriate class, and then specify its design in the style sheet. These are the code formatting rules. Therefore, for bold font in HTML, use the .

,

,

,

And
These tags are used to display subheadings at different levels. Use this tag when you want to draw attention to a specific word or phrase for reference purposes. This element reflects the importance and value of the content it frames.

How to make a beautiful font in html: sizes, colors, html font tags
The element should be used when other highlighting elements are not suitable. To be more precise: the elements from

serve to highlight headings, focusing attention is done using the element, important fragments should be highlighted with the element, and help text can be marked with the tag.

How to make bold font

Rating
( 2 ratings, average 4.5 out of 5 )
Did you like the article? Share with friends: