Inscription How to make in HTML Cursing Font in Text? HTML code fat font how to do tags

The saturation is called an increase in the thickness of the font lines and respectively contrast. Typically distinguish four types of saturation: light-drawn, normal, bold and fat. However, using HTML you can only install normal and fatty design. Two tags are used to install the text of the fatty inhabitation: and .

Fat staining font Strong selection of text

Contracting style

The cruising font is not just a slope of individual characters, for some fonts it is a complete alteration for a new style, imitating handwritten. Italic for text is determined by two tags: and .

Contracting font Text selection

It should be noted that tags and , as well as and Although they are similar in their actions, are not entirely equivalent and replaceable. First tag - is a tag of physical markup and establishes fat in the text, and the tag - tag of logical markup and highlights marked text. This separation of tags on logical and physical formatting was originally intended to make HTML universal, including independent of the information output device. Theoretically, if you use, for example, a speech browser, then the text decorated with tags and will be marked differently. However, it turned out that in popular browsers the result of using these tags is equivalent.

In Example 7.5, the use of tags is shown and For text design.

Example 7.5. Tags and

Decoration of text

And where is the cookies and moonshore?! - exclaimed boyfriend.



The result of this example is shown in Fig. 7.5.

In HTML font size plays an important role. It allows you to draw the attention of the user to important information placed on the site page. Although not only the size of the letters is important, but also their color, thickness and even a family.

Tags and attributes with robot with HTML fonts

The language of the hypertext has a large set of funds to work with fonts. After all, the formatting of the text is the main task of HTML.

The reason for creating the HTML language has become the problem of displaying text formatting rules browsers.


Consider tags that are used to work with fonts in HTML and their attributes. The main one is the tag . Using the values \u200b\u200bof its attributes, you can set several font characteristics:

  • color - sets the color of the text;
  • size - font size in conditional units.

The positive attribute value is supported from 1 to 7.

  • fACE - Used to install the text font families to be used inside the tag . A few values \u200b\u200blisted through the comma are supported immediately.

Only the text that is located between the part of the Font pair tag is formatted. The remaining text is displayed by standard font installed by default.

Also in HTML there are a number of pair tags that specify only one formatting rule. These include:

  • - Specifies bold font to HTML. Tag by action similar to the previous one;
  • - the size is greater than the default set;
  • - smaller font size;
  • - Inclined text (italics). A similar tag ;
  • - text with underscore;
  • - stressed;
  • - display text only in lower case;
  • - in the upper case.

Normal text

Thumbnail

Thumbnail

More ordinary

Less usual

Italics

Italics

With emphasis

Crushed

The features of the style attribute

In addition to the tags described, there are still several ways to change the font in HTML. One of them is the use of the Style universal attribute. Using the values \u200b\u200bof its properties, you can set the font display style:

1) Font-Family - the property sets the font family. You can enumerate several values.
Changing the font in HTML to the following value will occur if the previous family is not installed in the user's operating system.

Syntax of writing:

font-Family: Font name [, font name [, ...]]

2) Font-Size - the size is set from 1 to 7. This is one of the main ways to how in HTML you can increase the font.
Syntax of writing:

font-Size: Absolute Size | Relative size | Value | interest | inherit.

Font size can also be set:

  • In pixels;
  • In absolute value ( xX-SMALL, X-Small, Small, Medium, Large);
  • In percents;
  • Points (PT).

Font-Size: 7

Font-Size: 24px

Font-Size: X-LARGE

Font-Size: 200%

Font-Size: 24pt

3) Font-Style - Sets the style of writing the font. Syntax:

font-Style: Normal | Italic | Oblique | inherit.

Values:

  • normal -Normal writing;
  • italic - italics;
  • oblique - font with a slope to the right;
  • inherit - inherits the writing of the parent element.

An example of how to change the font in HTML using this property:

font-style: inherit

font-style: italic

font-Style: Normal

font-style: oblique

4) Font-Variant - translates all capital letters to the title. Syntax:

font-Variant: Normal | Small Caps | inherit.

An example of how to change the font in HTML by this property:

font-Variant: Inherit

font-Variant: Normal

font-Variant: Small-Caps

5) Font-Weight - allows you to set the thickness of the writing of the text (saturation). Syntax:

font-Weight: Bold | Bolder | Lighter | Normal | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

Values:

  • bold - installs a bold HTML font;
  • bolder - greasy relative to Normal;
  • lighter is a saturated relative to Normal;
  • normal - normal writing;
  • 100-900 - The font thickness is set in the numerical equivalent.

font-Weight: Bold

font-Weight: Bolder

font-Weight: Lighter

font-Weight: Normal

font-weight: 900

font-weight: 100

Font property and HTML font color

Font is another container property. Inside itself, it combined the values \u200b\u200bof several properties designed to change fonts. Syntax font:

font: Font-Size Font-Family | inherit.

Also, the fonts used by the system in inscriptions on various controls can be specified as a value.

  • cAPTION - for buttons;
  • icon - for icons;
  • mENU - menu;
  • message-Box - dialog boxes;
  • small-Caption - for small controls;
  • status-Bar - status string font.

font: icon

font: Caption.

font: Menu.

font: Message-Box

small-Caption.

font: Status-Bar

font: Italic 50px Bold "Times New Roman", Times, Serif

In order to set the color of the font in HTML, you can use the Color property. It allows you to set the color, both using the keyword and in the RGB format. As well as in the form of hexadecimal code.

Greetings to you, lovers to disassemble something new and replenish your knowledge chest with new information! After reading the article, you will learn how to make bold text in HTML, what other types of draws and which elements are responsible for it. As a result, your site will be able to boast of readable text with correctly dedicated key moments.

In past articles, I talked a lot about the attributes and tags of web languages, about the methods of registration of the appearance and, but never affected some object, without any site could not live. This is the text.

With that, not just a solid set of letters, and competently divided into paragraphs, with the selection of keywords, quotes, links, etc. To do this, in CSS languages, special instruments are provided. Baiver!

Opportunities in HTML

Text content font can always be modified. For example, set fatty in or meaning, and it can be decorated. To do this, there are simple tags that are very easy to remember and after applying. Below is a table of elements that clarifies their purpose.

To begin with, we will deal with the fatty in the text elements.

To increase the thickness of the letters, there are such pair tags as and . The use of these tools is displayed equally, as they format text into fat. However, their purpose is different. Therefore, they cannot be called equivalent and use only one of them.

So, tag It was created with the condition for changing the standard font into a saturated and thickened. It refers to the physical appearance of the drawing and no semantic load carries. So let's say it is just a type of test display.

BUT Designed for emphasis on key moment. This is a logic element, which would have allocated intonation during the conversation.

Now consider such tags like and .

They format standard font to the rush. I think you will define a logically arising question: "And these elements also deal with each other on the principle of tags and ? ". The question is correct. And you are right!

Indeed, a block of markup Designed to install accents at important moments and details, while Just a kind of appearance of content.

Font modification tools in CSS

CSS is not lagging behind and offers developers Similar tools for text editing. These are properties such as text-decoration and font.

- This is a universal parameter that complements the font of some details. Thus, the text can be "to force" to flash (Blink), emphasize (underline) or cross (Line-Through), spend a line over the words (Overline), inherit the characteristics of the parent object (inherit) or clear the font format from all additions (None).

The second frequently used mechanism for editing text content is the Font property. With it, you can change the font style (font-style), its size (font-size), set the cap, i.e. Specify the view of the lowercase letters (Font-Variant), as well as "play" with an inscription (font-weight).

And here is an example

Given all the information that I told above, we will try to create such an example code in which you use the knowledge gained at the maximum (I remind you that the code can be typed in).

Modifying text

Create a header for new Paragraph!

We write text content of the paragraph itself, which flashing .



Run the example in the browser and pay attention to the style of styles. Thus, the title is highlighted with light tilted stacking with an emphasis on the proposal. The paragraph is displayed by small capital letters. In this case, the text has logical and physical selection of words.

Now you can edit text filling over all of the rules. Subscribe to update my blog and invite friends. Bye Bye!

Sincerely, Roman Chuechev

One of the most simple ways to highlight the word or phrase in the text - use another drawing of letters. So you can emphasize the word or phrase, using bold pages with ease allows you to highlight words using different designs - mean, underlined, fatty.

Fat font as a way to highlight the main thing

Words highlighted with bold font look most bright and catch. Such words and phrases immediately rush into the eyes. So, in order to learn how to quickly allocate the necessary places in the text, you should remember the special HTML code. Fat font is exhibited by pair tag.

Before the word or phrase, a proposal that should be highlighted, the opening of the tag is set . After the last letter in the text, which should be highlighted, is placed closing tag. Everything that turns out between these two tags, when displaying in the browser has a fatty stroke.

Other options

So, we found out that you can select text using other design. Determined that the most simple and at the same time effectively use the fat font HTML. Now let's talk about other selection options.

So, you can select text in italics with a pair tag , emphasize it with . These are the most simple ways to highlight text.

There are also less well-known and used tags, with which you can allocate words and suggestions in the text. So, in order to cross the text, it is enough to use . Make the text monosol will help the pair tag . If you need to create an upper index, use , Nizhny - .

At the same time, as before, the text you need should be between the opening and closing tag. As you can see, there is nothing complicated, the main thing is to remember these codes or burn them.

Use multiple fonts

If you want to make text more expressive, you can use not only fatty font. HTML-markup allows you to simultaneously select the word using multiple stacks. So, you can simultaneously make the word fat, crossed and mean.

At the same time it is necessary to remember one thing - all the tags should be closed sequentially. For example, the correct record may be like this:

  • the selected text.

If you close the tags in a different order, the text will be allocated incorrectly. An example of an erroneous entry:

  • the selected text.

In this case, the browser is confused and will not understand what exactly you want from it.

By the way, it can be noted here that three options for drawing - fat, underlined and mean - remembered quite easily, if you have hot keys in Word. There, the drawing is set using the same letter keys when clamping Ctrl.

As you can see, you can use not only a course or fatty font. HTML markup allows you to highlight the words as easy as the usual Word.

conclusions

Not only a variety of colors and shades, different size and font type, but also its inscription are widely used to highlight text. Moreover, it is precisely using a different outline that is beautiful and easy to select one or another fragment of the text.

In order to change the font stacking, you should use any tag known to you. The fat font of the HTML pages is the most bright and noticeable, and therefore it is used most often to highlight.

Hello, dear blog readers! This article will talk about text formatting tags. Bright examples are the selection of text in bold or italics. We also consider the influence of some tags on the internal optimization of the site and the rules for writing them. About then you can read in the above article. By the way, you can meet similar text design elements in many text editors, for example, in Word.

Tags are divided into 2 types: block and lowercase. When using the first, you can change the content of the text of the text (lines, separate fragments, or words), and the second are. Formatting tags that we consider in this article are mainly lower than.

Rules and procedure for writing tags

You already know what opens and closing tags. If not, read the article in the very beginning of this material. If short, then tags are two types: single (for example, transfer to a new string
) and container (pair). So, all text formatting tags are parn. This means that any element has opening and closing tags, and the separated fragment must be placed between them. For example, the proper selection of the phrase will look like this: Dedicated fragment

When the browser processes this fragment, you will see this text: Dedicated fragment.By the way, in RSS ribbon all tags are not displayed ().

The main thing when writing tags - do not forget to close them. Otherwise, the entire text on the page will be highlighted fat (in the example with the tag ). But there are such cases when you need to highlight a certain fragment and bold and italics at the same time. But the tag that performs this action does not exist. Exit this situation is one: use two tags at the same time. In what order of their use does not have. Therefore, writing text with tags like this:

Dedicated fragment

or like this:

Dedicated fragment

You still get Dedicated fragment italic and fat at the same time. However, it is preferable to use the first option because it was originally the only and correct. Also, do not forget that each browser can process tags in different ways (), depending on the settings. And now we turn to the tags themselves

Selecting text in greasy and italics - tags , , and

The most popular text formatting tags are highlighting it. fat and italic. Usually they are used to give the importance to any fragment. The first case is used to highlight a fragment containing useful information or keywords. Italic applies for the same purpose as fatty text, but the information is less important, because it implies on the background of the main text less noticeable than the fat text.

Consider for start selecting text oily. For this action uses two tags - and . There is no difference in appearance. Although, given the fact that any browser can interpret each element in its own way, you can see any differences. Here's what the text looks like in tags and In an already processed browser form:

Text in Strong tags

Text in tags b

But what are the two lines in the source page of the page look like:

Text in Strong tags Text in tags b

The same situation we can observe in the case of tagges of selection italics and . Try to find differences between two examples:

Text in EM tags

Text in tags i

But the source code:

Text in EM tags Text in tags I

So, the discussed discharge tags in bold and italically does not actually differ, but then we, for example, we, for example, tag if there ? After all, the latter contains only one character (not counting brackets) and, therefore, it is easier to write. And the thing is that tags and Influence on. If you will surround these tags keywords, it will benefit on the promotion of the site. It should not overdo it - the maximum in the text should be 5% of the fatte text in the tag , and the same and the cursive in the tag .

If you want to simply highlight any moment in the text, then use the tag or . Generally, I think that search engines also consider the text in these tags as more important, but on internal optimizationthey still have a smaller impact than than and .

Text Selection Tags - , and

Now consider several tags that use the line in the design of the text. The most famous to you from text editors - tag or underscore. The influence on ranking this tag does not (as far as I know), but to allocate any text and focus on it will help. An example of using this tag I brought a little higher.

Two more similar to the purpose of the tag - and . Both perform the text overclocking function. You can use this tag in any situations: if you update the document (or rather part of it), you can cross the old and add a new one; If you are going to write something that leaves the topic of material; Something that does not correspond to moral and ethical standards.

Differences of these two tags are only in their writing, as a result, it is preferable to use the first, because Firstly, it is more convenient to write, and secondly, your page will be less than the HTML code, and the search engines like it.

Tag and attributes - text font parameters

Now consider the tag that is not used without attributes. With it you can specify the parameters for a specific fragment of the text. In general, now it is preferable to use (cascading style sheets), because With the help of them you can strongly reduce the entire HTML page code. So consider the very tag . For it there is only three attributes:

  • face. - Font itself. For example, ARIAL, COURIER or VERDANA. You can list several, because Not all users have an extensive set of fonts, and writing a few in the Face attribute, the browser will be able to choose which to use, or rather - which is present in the system;
  • size - Attribute indicating text size. It can be expressed both in conventional units and in pixels;
  • color - text color. This attribute can be used both in HTML-codes of colors and in verbal. The first have a form #FFFFFF (where F is any digit or letter from A to f), and the second are written with simple words (for example, Red - red).

So looks like text in tag Using each attribute:

This text has a size of 6px


This text is red

This text has a font Arial

This text of red and size 5px

But what you will see, after processing the written code:

Block text design elements - headlines

-

, paragraph

Finally, we will look at block elements that are used in almost every document. These are tags headlines and paragraph. Consider the first. Headers are 6 species and each has its own tag. Each type wears only its own sequence number and recorded with tags.

,

,...,

. Here's what the headers look like in the treated form:

Digit after the word header corresponds to the number in the tag . Headers have a huge impact on internal optimization, so conclude in tags keywords. The features of this case are quite a lot, what I will tell in subsequent articles.

And now let's talk about the tag of the allocation of paragraph

The function of this tag is to separate the text between the other text with an empty string. If you look at the source code of any document, you can see the following:

In green rectangles, one paragraph, in the red - the other. But how does this code look after processing a browser (the arrow indicates an empty string):

As a result, we get a fairly noticeable separation of one paragraph from another, which is good - reading becomes more convenient.

That came to the end of the article about document formatting tags. They are much more than, rather than I described in this material. Just some need to tell quite a lot about some, as a result, they will be devoted to individual articles with a full overview.!