How To Add Text To The Site

Table of contents:

How To Add Text To The Site
How To Add Text To The Site

Video: How To Add Text To The Site

Video: How To Add Text To The Site
Video: How To Add Text to a Webpage 2024, December
Anonim

Filling the site with content includes, among other things, adding new texts and their fragments to it. Text materials can be placed on separate pages, as well as included in existing ones. In both cases, they can be styled in different styles using tags.

How to add text to the site
How to add text to the site

Instructions

Step 1

Decide whether paragraphs of text should be separated from each other by blank lines. If so, put a tag in front of each one, and if not - tag

… Note that if you simply start a phrase on a new line in your HTML file without using any of these tags, the hyphenation will be ignored when displayed in the browser.

Step 2

Fragments of text can be italicized and bold. In the first case, place a tag before the beginning of the snippet, and in the second, place a tag. At the end of the snippet, place the same tag, but with a / in front of the letter, for example:. These effects can be combined, for example, like this: italic bold italic just bold. The new HTML specifications also include tags for strikethrough and - for underlined text. They can also be combined with the ones listed above, but they can be ignored by older browsers. This will not interfere with viewing the text you added, but the corresponding fragments will not be displayed underlined or strikethrough.

Step 3

Also, fragments of text can be highlighted with color and size. To do this, use a tag. Pass the size and color variables to it (separately or simultaneously), for example:. Here +2 is the number of points by which the font should be increased relative to the default setting in the browser. The value of the size variable can be negative, for example, if it is -1, the font will be reduced by one point from the default. The value of the color variable consists of three two-digit hexadecimal numbers. The first of them sets the intensity of the red component of the color, the second - to the green, and the third - to the blue. Thus, if this variable has a value of 00ff00, then the color will turn out to be bright green. At the end of the selection, undo the action of the tag:. The size and color of the symbols will return to their default values.

Step 4

To make the browser stop ignoring line breaks, and also stop turning multiple spaces into one, use the tag

… At the end of the snippet highlighted in this way, put the tag

… This technique can be used to post poems on websites, as well as fragments of source codes of programs in various programming languages.

Recommended: