ComputersProgramming

Red line. Make indent in HTML

When you design certain texts or even tables, 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 automatically created. But, unfortunately, not everything is so simple. So let's figure out how to properly format the text so that it looks beautiful and effective, and find out how you can indent HTML.

Method one

Let's start with the simplest, but at the same time labor-intensive indentation. To solve this problem, we use the space code - & nbsp ;. Using it at the beginning of the paragraph several times, you will get the indentation you need.

The advantages of this method is that this code is read by any browser. The disadvantage is that you will have to insert long and tedious spaces in the text you select. 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.

Method of the second

The second way is to indent using the paired tag

It is easier than in the first case. But the trouble is, this tagname indent only 40 pixels, in addition, when using it, the indent is set not only to the left, but also to the right, from above, and even from below. For text it's not always nice, for a table such a way to indent HTML will be much more effective.

If you want to nicely select a block of information - this tag will work, if not - we recommend using the first method or look at the remaining two.

Way the third

We substitute a word whose letters have the same color as the background, that is, at the beginning of each paragraph we insert the invisible word. Thus, it is easy to indent. HTML allows you to write a special code once and paste it at the beginning of each paragraph.

Yes, the solution is not bad, but what if your site has a background image or picture? This method is not suitable here. And besides, when you select this word will be seen. And remember that this code will be available to all Internet users. In this case, viewing 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 option is not entirely suitable for tables, although it can be used to format text.

Method Four

And, finally, the last ways to indent text. In HTML, this can be done with two simple tags. And the easiest way to make a paragraph is to use a bunch of two tags -

.

The first tag carries the text to a new line, forming a paragraph. The second one serves as a tabulator, that is, it places a red line. As you can see, everything is quite simple and understandable. In addition, such a record will be understood by most users who have looked at your website and are interested in its code.

Use this combination is easy, although it must be inserted at the beginning of each paragraph manually. But what to do, not all editors have the ability to beautifully and correctly format the text.

Do I need a paragraph tag?

Finally, let's talk a little about the

tag. Usually it is used to define the beginning of a new paragraph in the text. However, when using this tag, the red line in the paragraph does not remain , but there is an indent between the paragraphs.

In most European countries, this design is generally accepted, but does it suit us? We are all used to the presence of red lines, and we often ask ourselves how to arrange an indent in HTML, besides it is not always convenient to read the text formatted in this way.

If you want to make the text more familiar and easy to read, we recommend that you abandon the

tag and replace it with a

bundle. Believe me, it will be much more beautiful and elegant than having empty lines between paragraphs. And so you can save space on the screen.

conclusions

So, you and I have learned to make indents. As it turned out, this is not so difficult. The main thing is to know a few useful tags and codes, and also have the patience and spare time to arrange them.

You can indent HTML in several ways. We have analyzed 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.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.