With the design of certain texts or eventables webmasters have to deal with such a problem as the design of red lines, indents in the text. It would seem that everything is quite simple - copy the text to the desired field, and the indents will be drawn automatically. But, unfortunately, not so simple. So let's figure out how to properly format the text so that it looks beautiful and impressive, and find out how you can indent HTML.
Начнем с наиболее простого, но в тоже время time-consuming indenting. To solve this problem, use the space code -. By using it at the beginning of a paragraph several times, you will get the indent you need.
The advantages of this method are thatThe code is readable by any browser. There is only one drawback - it will be long and tedious to insert spaces into the text of your choice. This method is suitable for those who are just starting their acquaintance with HTML. Indents in the table can also be made in this way.
The second way is to indent using the pair
Easier than in the first case.But the trouble is, this tag indents only 40 pixels, moreover, when using it, the indent is set not only on the left, but also on the right, above, and even below. For text it is not always beautiful, for a table this way to indent HTML will be much more efficient.
If you want to highlight a block of information beautifully - this tag will do; if not, we recommend using the first method or look at the remaining two.
Method Three
Подставляем слово, буквы которого имеют the same color with the background, that is, at the beginning of each paragraph insert the word-invisibility. Thus it is easy to indent. HTML allows you to write a special code once and insert it at the beginning of each paragraph.
Yes, the solution is not bad, but what if your site hasbackground image or picture? This method will not work here. And besides, when you select this word will be visible. And also recall that this code will be available to all Internet users. In this case, after reviewing the source code of your page, users may remain at a loss. Therefore, we still recommend using special tags for indenting. Also note that this design option is not quite suitable for tables, although it can be used to format text.
Method Four
И, наконец, последний способов сделать отступ text. In HTML, this can be done using two simple tags. And the easiest way to make a paragraph is to use a bunch of two tags -
. The first tag transfers the text to a new line,forming a paragraph. The second serves as a tabulator, that is, sets a red line. As you can see, everything is quite simple and clear. In addition, such a record will be clear to most users who have looked at your site and are interested in its code.
It is easy to use this combination, although it will have to be inserted at the beginning of each paragraph manually. But what to do, not all editors have the ability to beautifully and correctly draw up the text.
Do I need a paragraph tag?
Finally, let's talk a little about the
tag.It is usually used to define in the text the beginning of a new paragraph. However, when using this tag, the red line in the paragraph is not saved, but there is an indent between the paragraphs.
In most European countries, this designis generally accepted, but does it suit us? We are all accustomed to the presence of red lines and quite often ask ourselves how to indent HTML, moreover, it is not always convenient to read text formatted in this way.
If you want to make the text more familiar andeasy for perception, we recommend to abandon the tag
, and replace it with a bunch
. Believe me, it will be much more beautiful and sleeker than the presence of blank lines between paragraphs. And so you can save space on the screen. conclusions
So, we learned to draw indents.As it turned out, it is not so difficult. The main thing is to know a few useful tags and codes, and also to have a reserve of patience and free time to arrange them.
Сделать отступ в HTML можно несколькими способами.We have disassembled each of them, highlighted their advantages and disadvantages. We also talked about the fact that the
tag is not always as useful as we would like.