ComputersProgramming

Red line html - 4 ways

The red line html can be set in 4 different ways. Although there are certain standards for this phenomenon, this programming language does not provide, therefore, there are no restrictions in this regard. In this article we will use an off-standard set of tools for creating a red line.

1st method

It starts with the most common method. Only in this case it is necessary to use cascading tables, because CSS is inextricably linked with the language of hypertext markup. The red line html can be set using the "text-indent" property. It is enough to specify the desired element and the distance that will be used to indent the left side of the document. For example, writing: "p {text-indent: 20px;}" means that a red line of 20 pixels in each paragraph p will be made. As an element for which a value is specified, you can use any block of text. In fact, this property does not set a red line, but simply indent the first line of the selected item. But who will notice the difference? The "text-indent" property can take three different kinds of values:

  • Any conventional unit of measure, for example px (pixels), in (inches), pt (points) and others.
  • Percentage value. In this case, the distance from the parent element is taken into account.
  • Inherit. If you specify this value, the property will be inherited from the parent element.

2nd method

In html, a red line can be set without connecting cascading tables. It is enough to put several spaces before the first character in the source code of the page. Only need to use special characters, namely "& nbsp;" because if you put an ordinary blank, then only one will be taken into account. And with the use of this symbol you can set the necessary indentation. Such a red line of HTML will not have a global application, and you will have to put all the spaces manually. This negative will greatly burden you when working with a large number of documents. Also, this method will declare your page code invalid.

3rd method

Use bottom underscore, masked under the background. Any symbol can be used in this method. The most important thing is to change the font color of this text fragment to the same as the background. Let this method is not the most rational, but the efficiency is 100%. So once again we will repeat:

  • At the very beginning of the line, you need to insert a few duplicate characters, for example: ___.
  • Next, you need to change the font color of these characters to match the background.
  • You can assign the replacement of paint by all known methods, for example, using CSS-styles or HTML tools.
  • This method is not suitable if the image is selected as the background, because our symbols will be highlighted.
  • It's worth noting that when you select a text fragment, the user will see a fake red html line.

4th method

The red line in html can be set in a variety of ways. If none of the above methods is suitable, we suggest that you use an empty image. Transparent images can be created with the format png or gif (only they have this feature), or take a picture of jpeg and fill it with the background color. Next, you just need to insert a picture using the tag.

Conclusion

As an output, we can say that html together with CSS allows you to make a wide variety of effects. Sometimes properties and elements are not used for their intended purpose, but do not go too far from the standard value of tags.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

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