Basics of HTML

  1. Terms and Definitions
  2. Principles of WEB 2.0
  3. The structure of the HTML-document
  4. Main metatags
  5. Formatting Text HTML
  6. Lists html-page
  7. Text fixed format
  8. Selected text html-page
  9. Change font options
  10. Graphics html-page
  11. Tables html-page
  12. Hyperlinks
  13. IMAGEMAP
  14. Frames

CSS-based

  1. What is CSS
  2. CSS syntax
  3. Style classes
  4. Combined styles
  5. CSS table
  6. CSS cascading rules
  7. Recommendations applying styles
  8. Font options
  9. Line breaks, vertical alignment
  10. Background settings
  11. Parameters of the paragraph
  12. List options
  13. The parameters of the cursor
  14. Options indentation
  15. Parameters frame
  16. Parameters selection
  17. Display options
  18. Containers


   

Text fixed format (tag PRE)

Suppose the text html-page fragment of a poem should be brought, for example:


Should this life sometime deceive you,
Don’t be sad or mad at it!
On a gloomy day, submit:
Trust — fair day will come, why grieve you?

Heart lives in the future, so
What if gloom pervade the present?
All is fleeting, all will go;
What is gone will then be pleasant.

Alexander Pushkin,1825

If you write the text, as we see it, we did not succeed, because the browser will display all the text on one line. Why?

Remember that the browser when displaying text block element to which the tag R, the following rules:

So that the poem was displayed in the browser is correct, you should take care of it "by hand". To do this, each line of the poem in the html-code should end with the tag line breaks BR.

EXAMPLE:

<p><br>
Should this life sometime deceive you,<br>
Don’t be sad or mad at it!<br>
On a gloomy day, submit:<br>
Trust — fair day will come, why grieve you?<br>
<br>
Heart lives in the future, so<br>
What if gloom pervade the present?<br>
All is fleeting, all will go;<br>
What is gone will then be pleasant.<br>
<br>
Alexander Pushkin,1825
</p>

The problem can be solved in another way, using a fixed-format tag - PRE. To do this, you just have to sign into the source of the tag.

EXAMPLE:

<pre>
Should this life sometime deceive you,
Don’t be sad or mad at it!
On a gloomy day, submit:
Trust — fair day will come, why grieve you?

Heart lives in the future, so
What if gloom pervade the present?
All is fleeting, all will go;
What is gone will then be pleasant.

Alexander Pushkin,1825
</pre>

When you use the tag PRE text is displayed as it is written.

The rules fixed text format:

typewriter font - fonts that have the same width (for example, Courier New). Proportional fonts - fonts that have different widths (for example, Arial).

The text is a fixed format as a block element, and is used to display the source code of programs or rapid publication of documents on the Internet, which have been set in plain text.


TOP ↑