This article will explore some features linked to the organization of paragraphs and text blocks. Remember that the purpose of HTML is to allow the structuring of content.

The tags <h1>, <h2>, <h3> <h4> <h5> and <h6> are used to mark an area of ​​the document that indicates a header – head (a title or caption, for example). The lower is the value, the more highlight presentation of the header will receive. The headers are shown in bold and, at the end thereof, a line break is made. The use of headers demarcates an area of ​​text that deserves highlighting, and is normally used to start it, stating, for example, the title of it. Optionally, you can use the align parameter to indicate the alignment of the header: right, left or center.

The <p> (paragraph) tag demarcates a text paragraph. Splitting a text into paragraphs is an activity present in any newsroom. Associated with the <p> tag, there is a parameter called align which informs the alignment of the text, which can be centralized (center), justified (justify), left-aligned (left) or right-aligned (right). The use of the <p> tag solely, such as <p> </ p> produces a line break. However, there is a special tag for this purpose.

There are situations in which we have the need to maintain the presentation of a text as it is typed (ie, respecting spaces and tabs and line breaks). A typical situation where this occurs is when we need to represent an example of a programming language.

In this case, the indicated option is the <pre> tag (predefined). Its visual effect is a left indent and the text presentation in a fixed-size font such as the one used when it was typed (respecting linebreaks, spaces and tabs). The <pre> tag, at the time the code is viewed, keeps text positions as they have been predefined in the HTML document.

The browser ignores line breaks informed throughout the text. To produce the desired effect, we must use the tag <br /> (break) that is independent, ie, does not need another tag to close it, and it is enough to indicate in the opening instruction itself, the signal “/” to close it automatically.

The <hr /> (head row) has the same principle of the <br /> tag, but its effect is the production of a line that divides the page horizontally. Its aim is to produce division of sections over content

Finally, the <font> tag acts on text attributes itself. In summary, there are three attributes that we can change: the size (size), the type (face) and color (color). The size is defined as the use of an integer and can be used absolutely (directly with the number) or relatively, indicating, through the positive (+) or negative (-) signs, the increment or decrement value in relation to the default browser. The absolute value for the size attribute (which defines the size) can vary between 1 and 7 – the higher the number, the greater the size of its display.


HTML and its basic structure

You might also like…

Cache technique in PHP

Cache technique in PHP In this example we will check the actual optimization using a small scri...

A look at Scriptcase 9

In a daily basis this tool has given me great satisfaction, and very good and fast results in terms ...

Deep Data: Is it possible when you’re non-profit?

Evan Liebovitch talks about deep data and how to document the needs of a non-profit while using Scri...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.