Tab tag in html. Whitespace characters and their formatting of code in Html, as well as non-breaking space special characters and other mnemonics. Cases of using some special characters, including non-breaking space and soft hyphen

Tag

The tag specifies a tab character in the text. It is the same as using the /t escape sequence.

1 2 3\t\t\t4
Displayed:
1 2 3 4

The distance that a line will shift when a tab character is entered into it can be set arbitrarily. This is done by the TABSTOPS attribute of the tag.

The tag is not a standard HTML tag. It has been added to the Flash markup tags so that text formatting can be done in a consistent way.

Tag...

The tag is responsible for text formatting characteristics such as margins, indents, and line breaks. The following attributes can be set in it:

LEFTMARGIN. The size of the left margin in points. An analogue is the leftmargin property of the TextFormat class.

RIGHTMARGIN. The value of the right margin in points. The analogue is the rightmargin property of the TextFormat class.

INDENT. The indent of the first line of the paragraph, in points. Among the properties of the TextFormat class, the indent property is similar to it.

BLOCKINDENT.

Left indent of a text paragraph in points. Analog - property blockIndent
TextFormat class.

LEADING. Distance between lines in points. A similar property of the TextFormat class is leading.

TABSTOPS. The attribute specifies what line offset in points each tab character in the sequence will cause. Its value is a list of numbers that contain the distances at which the line will move to the window if 1, 2, 3, ... n tab characters are typed in a row. An analogue of the TABSTOPS attribute is the tabStops property of the TextFormat class.


pole.html=pole.border=pole.multiline=true;
field.htmlText="

0 one tab > Two tabs >
THREE TABAR>

";

The tag is not a standard HTML tag. It was introduced so that the possibilities of marking up text using tags were similar to using the properties of the Text Format class.

Tag...

Tag is designed to apply a CSS class style to an arbitrary text fragment.

The class name is specified in its CLASS attribute.

This.createTextField("pole", 0, 150, 150, 200, 90);
pole.autoSize = pole.border=pole.multiline=true;
// Create three class styles that define red, green, and blue text
var style:TextField.Stylesheet = new TextField.Stylesheet();
var green_text:String = ".GREEN (color:#00FF00)";
var red_text:String = ".RED (color:#FF0000)";
var blue_text:String = ".BLUE (color:#0000FF)";
style.parseCSS(green_text+red_text+blue_text);
pole.styleSheet=style;
// Display text with created styles
field.text=" 3green text

red text

Blue text ";

Hello, dear readers of the blog site! Those who at least superficially managed to get acquainted with, probably, have already taken note, albeit in general terms. This means that they have an idea of ​​what HTML characters are generally used in the document code.

In today's article, we will try to figure out what a space is in HTML, in which cases you can use whitespace characters when formatting the code itself for easy perception. We will learn when it is necessary to use a non-breaking space, and also get acquainted with other special characters (or, as they are also called, mnemonics).

In fact, I would advise not to ignore the topic of using various special characters, since this is an important component to complete the study of hypertext markup language. In general, the information provided in this publication will definitely not be superfluous. Well, now to the point.

Spaces and Whitespace Characters in HTML

First, an important remark needs to be made. There are special keys on the computer keyboard that allow you to implement text separation (more on this below). However, only the wide space bar provides a separation between words, not only in the editor, but also in the browser window. There are nuances when wrapping lines and indenting from the edge.

As you know, the display of certain elements in a web browser is determined by tags. For text formatting, a well-known , which is block-based, is used. That is, its content is located across the entire available width.

To wrap lines inside paragraph P, you need to use a single BR tag, with which this can be done. Let's say we need to insert into the text some lines from a poem that we write in a text editor:

Despite the fact that the lines of the verse are located correctly and the hyphens are made in the right places, everything will look different in the browser:


To achieve the same display in a web browser window, you need to write BR at each line break:

Now we have achieved the task and in the browser the poetic lines will be displayed quite correctly:

Thus, the necessary line breaks are completed. Here it is also necessary to note such a feature that multiple spaces following one after another are displayed by the web browser as one. You can verify this if in the same editor you try to put not one, but several spaces between two words and, by clicking on the "Save" button, look at the result in the browser.

Space, tab and line break

Basically, with these whitespace characters we get to know each other as soon as we start working with the text in the editor and format it in the right way. To implement such a task, there are special keys, each of which corresponds to its own space character:

  • Space - the widest key on a computer keyboard (without an inscription);
  • Tabulation - a key on the left with the inscription "Tab" and two arrows pointing in different directions;
  • Line break - "Enter" key.

However, as I said above, we get the final desired result not only in a text editor, but also in a browser, only when using the first key. All three keys (including tab and line break) are useful when formatting HTML code. Let's say this is how a code fragment looks in NotePad ++ (explanatory material about this editor) when all whitespace characters are displayed:


We get code that is easy to read and understand thanks to spaces. The orange arrows mark the indents created with the Tab key, and the CR and LF characters mark the line breaks done with the Enter key.

Nested containers are viewed, opening and closing tags stand out well. In this form, this code can be easily edited. Now compare it with the same code, which does not have such a text separation:

In the same way, using whitespace characters, you can write CSS rules that will visually look understandable and digestible:


After you bring all the styles to a common denominator and completely finish editing the style file, you can subject it by removing all spaces from the code. This is necessary to increase, which is very important when promoting a resource.

Special characters (or mnemonics) in HTML code

Now let's look at the cases in which it is necessary to use the special characters that I mentioned at the beginning of the article. HTML special characters, sometimes referred to as mnemonics, were introduced to solve a long-standing encoding problem in hypertext markup language.

When you type text on the keyboard, the characters of the language you are using are encoded. In a web browser, the typed text will be rendered in the fonts you choose as a result of the reverse decoding operation.

The fact is that there are many such encodings, now we do not have the goal of analyzing them in detail. It's just that each of them may lack certain characters, which, however, must be displayed. Let's say you feel like writing single quotes or an accent mark, and these icons are corny missing in the set.

In order to eliminate this problem, a system of special characters was introduced, which includes a huge number of various mnemonics. They all start with an ampersand "&" and usually end with a semicolon ";". At first, each special character had its own digital code. For example, for a non-breaking space, which we will consider in more detail below, the following entry will be true:

But after some time, the most common characters were assigned literal counterparts (mnemonics) to make them easier to remember. Let's say for the same non-breaking space it looks like this:

As a result, the browser displays the corresponding character. The list of mnemonics is very voluminous, most commonly used special characters in HTML you can find from below following table:

symbol the code mnemonics description
non-breaking space
narrow space (en-width the letter n)
wide space (em-width to the letter m)
- em dash (en-dash)
- em dash (em-dash)
­ - ­ soft transfer
a ́ accent, placed after the "shock" letter
© © copyright
® ® ® registered trademark mark
trade mark sign
º º º spear of mars
ª ª ª mirror of Venus
ppm
π π π pi (use Times New Roman)
¦ ¦ ¦ vertical dotted line
§ § § paragraph
° ° ° degree
µ µ µ micro sign
paragraph mark
ellipsis
overlining
´ ´ ´ accent mark
number sign
🔍 🔍 Magnifying glass (tilted to the left)
🔎 🔎 Magnifying glass (tilted to the right)
signs of arithmetic and mathematical operations
× × × multiply
÷ ÷ ÷ divide
< < smaller
> > > more
± ± ± plus/minus
¹ ¹ ¹ degree 1
² ² ² degree 2
³ ³ ³ degree 3
¬ ¬ ¬ negation
¼ ¼ ¼ one quarter
½ ½ ½ a half
¾ ¾ ¾ three quarters
fractional bar
minus
less or equal
more or equal
approximately (almost) equal
not equal
identically
square root (radical)
infinity
summation sign
product sign
partial differential
integral
for everyone (only visible if bold)
exist
empty set
Ø Ø Ø diameter
belongs
not belong
contains
is a subset
is a superset
is not a subset
is a subset of either
is a superset or equal to
plus in a circle
multiplication sign in a circle
perpendicular
injection
logical AND
logical OR
intersection
Union
currency signs
Euro
¢ ¢ ¢ Cent
£ £ £ Lb
¤ ¤t; ¤ Currency sign
¥ ¥ ¥ Yen and yuan sign
ƒ ƒ ƒ Florin sign
markers
. simple marker
a circle
· · · middle point
cross
double cross
peaks
clubs
hearts
diamonds
rhombus
pencil
pencil
pencil
hand
quotes
" " " double quote
& & & ampersand
« « « left typographic quotation mark (herringbone quotation mark)
» » » right typographic quotation mark (herringbone quotation mark)
single angle quote opening
single angle quote closing
stroke (minutes, feet)
double stroke (seconds, inches)
upper left single quote
upper right single quote
right bottom single quote
quotation mark-foot left
quotation mark-foot upper right
quotation mark-foot lower right
single English quotation mark opening
single English quotation mark closing
double English quotation mark opening
double English quotation mark closing
arrows
left arrow
up arrow
right arrow
arrow to down
arrow left and right
up and down arrow
carriage return
double left arrow
double up arrow
double right arrow
double down arrow
double arrow left and right
double arrow up and down
triangular up arrow
triangular down arrow
triangular right arrow
triangular left arrow
stars, snowflakes
Snowman
Snowflake
Snowflake pinched by shamrocks
Fat sharp-angled snowflake
shaded star
unshaded star
Unfilled star in a filled circle
Filled star with unfilled circle inside
spinning star
Drawn white star
Middle unfilled circle
Medium filled circle
Sextile (snowflake type)
Eight-pointed spinning star
Asterisk with spherical endings
Bold eight-pointed drop-shaped propeller star
Hexadecimal asterisk
Twelve-pointed filled star
Bold eight-pointed rectilinear shaded star
six-pointed filled star
Eight-pointed rectilinear shaded star
Eight-pointed shaded star
eight-pointed asterisk
An asterisk with a blank center
fat star
Pointed four-pointed unshaded star
Pointed four-pointed shaded star
star in a circle
Snowflake in a circle
clock, time
Clock
Clock
Hourglass
Hourglass

Cases of using some special characters, including non-breaking space and soft hyphen

If you have already studied the table a little, then you have received confirmation of the words I said above that to display all special characters, a numeric code () or its alphabetic analogue (character mnemonic) is used, where letters () are written instead of a combination of lattice and numbers.

Now let's see when it is necessary to apply these codes. Let's say in an article you need to specify some HTML tag for informative purposes, for example,

. If you type angle brackets from the keyboard (and there is such a possibility), then the browser will perceive such a construction as an opening tag, and not as a simple piece of text.

Therefore, we take the corresponding codes from the same table of HTML special characters and the entire entry will look like this:

In addition, in order to display in the browser not the ampersand itself, but its designation in form

, you need to add its code from the table:

footer

Then the browser will display exactly the entry of mnemonics that need to be applied to display the FOOTER tag. A little confusing, but on this page you can practice this aspect by entering the mnemonics for the corresponding characters in the "HTML" field and using the "Run" button, and in the "Result" area, getting the result of their display in the browser:


Please note that I have provided text wrapping using the already mentioned BR tag so that the characters themselves are displayed not in one line, but in a column for convenience.

Move on. Sometimes in the text there are combinations that it is undesirable to separate into different lines. Let's say "1000 rubles." it will be logical to either leave it on the top line, or, if there is not enough space, move the entire structure to a line below.

This is especially true if users use devices with different screen widths, including mobile devices. Indeed, in this case, the web browser formats the text, adjusting to the new conditions. And if the text looks correct at standard monitor sizes, then when they change, everything can change.

For these cases, there is non-breaking space HTML which I already mentioned. Let me remind you that in this case the space code is:

And it needs to be inserted between the two sets of characters that you want to link:

1000 rub.

Now the browser will never separate them, even if text formatting is required to display it correctly.

There is also a situation where a very long word does not fit in the free space and you need to transfer part of it. How, if necessary, to predetermine a line break in this case? For this there is soft hyphen special character-, which must be placed in the place where the word must be broken:

longlonglonglonglongword

If a situation arises when a word needs to be hyphenated, then a gap is formed at the location of the soft hyphen mnemonic, where a hyphen (hyphen) will appear, and the rest of this word will be on the next line below.

However, again, it will be useful to track this whole thing, including examples of inextricable and soft transfer, with your own eyes in practice:


In the window of this editor, you can resize the “Result” view field by grabbing the edge of this area with the left mouse button and, without releasing it, drag it to the left to reduce the width. Then there is a real situation when the browser starts to reformat the content to display it correctly.

And the transfer is carried out, which was provided for in the examples I described. However, you yourself can move the viewing window, expanding or narrowing it, and visually verify this.

There is a difference between what written in your HTML code and that displayed in the browser.

As we have seen, tags HTML like<р>, are only read by the browser (to know which type content is written), but not displayed in him.

We have also seen how to write comments in the HTML code to help a person read the code without having to display those comments in the browser.

Another kind of written code that ignored browser is space, it includes:

  • line breaks;
  • empty lines;
  • tabulation (or indentation).

Line breaks

Line breaks and empty lines (which are a sequence of line breaks) in HTML code ignored browser. They only constitute single space.

The original idea of ​​the web was that it should be a collaborative space where you can communicate by exchanging information.

To be real insert line break you need to use element
:

At best, life is perfect
unpredictable

Tabulation

Tabulation is a special character obtained using the Tab key. It usually moves the cursor to the next tab stop, but sometimes turns into two spaces.

In any case, like a regular space, tab invisible. It is also ignored by the browser:

Let's push this text with a tab.

If you want to add space before In other words, you have to use CSS.

If you want to close an HTML element, you must first close all of its child elements.

Tree Formatting

Because HTML elements can be nested, you must take care in order in which they were opened, as this will affect the order in which they are closed.

This code is written in one line.

Because it can be difficult to keep track of the order in which HTML elements were opened, it is recommended that you write your HTML in tree:

This code is written in some lines, but will still be displayed as one line.

Tree formatting allows visually reproduce nesting level your HTML code. This makes it easy to see that:

  • is an ancestor;
  • - parent for and ;

  • and - This fraternal elements.

Write HTML for yourself to read

Tabs, blank lines, set of spaces and line breaks are omitted by the computer and they all turn into one space.

An HTML document is written and read by a human, but only read by a computer. Given that tabs, spaces, and line breaks do not affect how a browser will read and subsequently display a web page, you can format your document to be as readable as possible. myself way.

There are no specific rules regarding HTML formatting, but there are implicit ones. agreements, in particular:

  • use tabulation to help visualize investments HTML elements;
  • insert opening and closing tags of block elements on separate lines;
  • write inline elements on one line (including opening and closing tags).

When a document is displayed, spaces and empty lines are not preserved, except for text enclosed in tags. PRE(preformatted text). That is, any sequence of spaces, tabs, and empty lines is equivalent to a single space in an HTML file. On the other hand, a space in an HTML file can be represented using any number of spaces or new (blank) lines.

Term newlin(newline) is used to THEORETICALLY mark the end of a line. SGML defines that a line (record) must begin with a start character (newline - line feed, LF, ASCII code 10) and end with a record end character (carriage return, CR, ASCII 13). In practice, HTML documents are presented and transmitted using a newline representation consistent with given computer systems. Therefore, HTML browsers allow support for any of the three common line splitting representations, denoted by the sequence CR LF, CR only, or LF only, and based on this assumption, and highlight errors in the presentation of the start and end characters of a record.

Thus, it doesn't matter how you separate the text into lines, as a newline is equivalent to a space. Note, however, that you don't have to split a word into two lines in HTML. If you, for example, split the word international into two lines, as follows:

international

it will be interpreted as

international

Thus, to present your document logically, you should use HTML tags such as P or BR to provide a newline if necessary.

Browsers usually don't split words on two lines, unless the word contains a hyphen. The referenced HTML 3.2 specs are not very precise on this matter and when discussing the table section, the following is given:

For some user agents, it may be necessary or desirable to translate a string within a word. In such cases, it is desirable to verify visually that this has happened.

Beware that line length is out of your control. It depends on the browser, computer and settings made by the people viewing your document. Generally speaking, there is no means to prevent line breaks between words, but you can try to prevent line breaks by using continuous spaces.

Regarding the use of newlines in combination with HTML tags, there are special rules:

  • A newline immediately following the start tag is ignored. For example, the lines
  • Likewise, the newline preceding the end tag is ignored. For example, the lines

The horizontal tab character (HT) can be used in an HTML document. But within the element PRE the tab character has a special interpretation, is equivalent to a space, and does not carry information about tabs of any kind. (To represent tabulated data, use the element table.) In practice, it's best to avoid including tab characters in HTML code, and use the appropriate number of spaces instead if you want to format the source code of an HTML document as tabs.

Hello, dear readers of the blog site. A little earlier, we already managed to talk about how we also learned about the design in it. Today we have in turn the concept of a gap in HTML, as well as the formatting of the code associated with it when writing it (for the convenience of its subsequent reading and perception).

Well, due to the fact that we will touch on the topic of non-breaking space and soft hyphenation, we will have to focus our attention on the so-called special characters or mnemonics used in the Html language, which will allow you to add a lot of additional characters to the web document code, like the one already mentioned above . But first things first.

Spaces and Whitespace Characters in Html Language

Before moving on to the issue of formatting text using specially designed tags for this (paragraph, headings, etc.), I want to dwell on the moment how spaces, line breaks (Enter) and tabulation are interpreted in the HTML language, how the breakdown is carried out text in the browser window when resized.

True, for this kind of visual formatting (which will not be visible on the web page), most often they use not the spaces themselves, but the tabulation and line break characters. There is such a rule - when you start writing a nested Html tag, then indent with a tab(Tab key on the keyboard), and when you close this tag, remove the indent (Shift + Tab key combination on the keyboard).

You need to do this so that the opening and closing tags would be at the same vertical level (the same number of tabs from the right edge of the page of your Html editor, for example, Notepad ++, which I wrote about). In addition, I advise you to make several line breaks immediately after writing the opening element and immediately write the closing element at the same level (number of tabs), so as not to forget to do it later.

Those. the opening and closing elements should be at the same level vertically, and we shift the internal tags by one tab character and place the closing and opening elements again at the same level.

For simple web documents, this may seem like overkill, but when creating more or less complex ones, they the code will be much clearer and readable due to the abundance of spaces, and it will also be much easier to notice errors in it due to the symmetrical arrangement of tags.

Special characters or mnemonics in Html code

So, now let's talk about the so-called special characters, the usability of which I announced at the beginning of this article. Special characters are also sometimes called mnemonics or substitutions. They are intended to solve a problem that has arisen in the hypertext markup language for a long time, related to the encodings used.

When you type text from the keyboard, the characters of your language are encoded according to a predetermined algorithm, and then they are displayed on the site using the fonts you use (where to find and how to install for the site) due to decoding.

There are a lot of encodings, but for the Html language, an extended version of encodings has been adopted by default.

In this text encoding, it was possible to write down only 256 characters - 128 from ASCII and another 128 for letters of the Russian language. As a result, there was a problem with the use of characters on sites that are not included in ASCII and are not Russian letters that are part of the Windows 1251 (CP1251) encoding. Well, you took it into your head to use a tilde or an apostrophe, but the coding used by the Html language does not have such capabilities initially.

It is for such cases that substitutions, or, in other words, mnemonics, were invented. Initially special characters were numeric, but then for the most common of them, their alphabetic counterparts were added for ease of remembering them.

Generally speaking, a mnemonic is a character that begins with an ampersand "&" and ends with a semicolon ";". It is on these grounds that the browser, when parsing Html code, extracts special characters from it. The ampersand in the numeric substitution code must be immediately followed by the pound sign "#", which is sometimes called a hash. And only then follows the numeric code of the desired character in Unicode encoding.

More than 60,000 characters can be written in Unicode - the main thing is that the mnemonic symbol you need is supported by the font used on your site. There are fonts that support almost all Unicode characters, and there are options with only a certain set of characters.

The full list of special characters will be simply huge, but most commonly used mnemonics you can borrow, for example, from this table:

SymbolHtml codeDecimal
the code
Description
non-breaking space
narrow space (en-width the letter n)
wide space (em-width to the letter m)
- em dash (en-dash)
- em dash (em-dash)
­ - ­ soft transfer
a ́ accent, placed after the "shock" letter
© © copyright
® ® ® registered trademark mark
trade mark sign
º º º spear of mars
ª ª ª mirror of Venus
ppm
π π π pi (use Times New Roman)
¦ ¦ ¦ vertical dotted line
§ § § paragraph
° ° ° degree
µ µ µ micro sign
paragraph mark
ellipsis
overlining
´ ´ ´ accent mark
number sign
🔍 🔍 Magnifying glass (tilted to the left)
🔎 🔎 Magnifying glass (tilted to the right)
signs of arithmetic and mathematical operations
× × × multiply
÷ ÷ ÷ divide
< < smaller
> > > more
± ± ± plus/minus
¹ ¹ ¹ degree 1
² ² ² degree 2
³ ³ ³ degree 3
¬ ¬ ¬ negation
¼ ¼ ¼ one quarter
½ ½ ½ a half
¾ ¾ ¾ three quarters
fractional bar
minus
less or equal
more or equal
approximately (almost) equal
not equal
identically
square root (radical)
infinity
summation sign
product sign
partial differential
integral
for everyone (only visible if bold)
exist
empty set
Ø Ø Ø diameter
belongs
not belong
contains
is a subset
is a superset
is not a subset
is a subset of either
is a superset or equal to
plus in a circle
multiplication sign in a circle
perpendicular
injection
logical AND
logical OR
intersection
Union
currency signs
Ruble. The ruble sign must be used with a break from the number. Unicode 7.0 standard. If you don't see the image, update your Unicode fonts.
Euro
¢ ¢ ¢ Cent
£ £ £ Lb
¤ ¤ ¤ Currency sign
¥ ¥ ¥ Yen and yuan sign
ƒ ƒ ƒ Florin sign
markers
. simple marker
a circle
· · · middle point
cross
double cross
peaks
clubs
hearts
diamonds
rhombus
pencil
pencil
pencil
hand
quotes
" " " double quote
& & & ampersand
« « « left typographic quotation mark (herringbone quotation mark)
» » » right typographic quotation mark (herringbone quotation mark)
single angle quote opening
single angle quote closing
stroke (minutes, feet)
double stroke (seconds, inches)
upper left single quote
upper right single quote
right bottom single quote
quotation mark-foot left
quotation mark-foot upper right
quotation mark-foot lower right
single English quotation mark opening
single English quotation mark closing
double English quotation mark opening
double English quotation mark closing
arrows
left arrow
up arrow
right arrow
arrow to down
arrow left and right
up and down arrow
carriage return
double left arrow
double up arrow
double right arrow
double down arrow
double arrow left and right
double arrow up and down
triangular up arrow
triangular down arrow
triangular right arrow
triangular left arrow
stars, snowflakes
Snowman
Snowflake
Snowflake pinched by shamrocks
Fat sharp-angled snowflake
shaded star
unshaded star
Unfilled star in a filled circle
Filled star with unfilled circle inside
spinning star
Drawn white star
Middle unfilled circle
Medium filled circle
Sextile (snowflake type)
Eight-pointed spinning star
Asterisk with spherical endings
Bold eight-pointed drop-shaped propeller star
Hexadecimal asterisk
Twelve-pointed filled star
Bold eight-pointed rectilinear shaded star
six-pointed filled star
Eight-pointed rectilinear shaded star
Eight-pointed shaded star
eight-pointed asterisk
An asterisk with a blank center
fat star
Pointed four-pointed unshaded star
Pointed four-pointed shaded star
star in a circle
Snowflake in a circle
clock, time
Clock
Clock
Hourglass
Hourglass

There is quite an interesting way to get Html code of mnemonics for the character you need. To do this, it will be enough to open the Microsoft Word editor, create a new document and select "Insert" - "Symbol" from the top menu (I use the 2003 version, so I don't know how to do a similar operation in later versions).

In the window that opens, you need to select a font, for example, Times New Roman (or any other that will certainly be present on most computers of your site visitors - Courier or Arial, for example).

Add all the special characters you need from the list that opens to your Word document and save this Word document as a web page (selected from the ".html" drop-down list when saving). Well, then you just have to open this web page in any Html editor (the same Notepad ++ is fine) and you will see all the digital codes of the mnemonics you need:

The method is a bit complicated, but if you feel the urge to use some rare special character on the page of your site, then it will be easier than looking for tables on the Internet like the one above. You will need to insert the resulting special character code in the right place and instead of it on the web page, the browser will display the character you need (for example, a non-breaking space).

Non-breaking space and soft hyphenation in examples

As I mentioned above and as you can see from the table of special characters given just above, some mnemonics in Html received, in addition to digital, also a symbolic designation for their easier memorization. Those. instead of the pound sign "#" (hash) in character variants, words are used. For example, the same non-breaking space can be written either as (digital mnemonic) or as (character).

When writing articles, if you need to insert an ampersand (&) or an open angle bracket (<), то для этого обязательно нужно использовать спецсимволы. Дело в том, что эти знаки в Html означают начало тега и браузер будет рассматривать их именно с этой точки зрения и отображать в тексте не будет.

That is, if you are writing an article in which you will need to insert into the text, for example, the display tag< body>or else you just need to insert a less than sign (<), то сделав это без использования подстановок на веб странице вы ничего не увидите, т.к. браузер, обнаружив «<» , поймет, что это Html тег, а не текст статьи.

Therefore, you will need to insert the following construction to solve such a problem:

The same applies to displaying the code of the mnemonics themselves, because they begin with an ampersand. You will need to insert a code into the text with the replacement of the ampersand sign with its substitution (special character):

This will need to be done to get on the page<, а не отображение левой угловой скобки (<), в которую преобразует браузер мнемонику <, обнаружив при разборе знак амперсанда. Хитро, но вы все поймете попробовав это на практике.

Also, you will most likely use a non-breaking space, which will look like a regular space on a web page, but the browser will not treat it as a space character at all and will not transfer over it(for example, this would be appropriate for such phrases as 1400 GB, etc., which it would not be desirable to carry a hyphen over different lines):

1400 GB.

Sometimes the opposite situation may arise, when there are very long words in the text and you want to make sure that, if necessary, the browser could break these words with a transfer. For such purposes, a special symbol "soft transfer" is provided -

Long, long word;

When it becomes necessary to move to another line, the browser will put a hyphen instead of the soft wrap mnemonic and send the rest of the word to the next line. If there is enough space to accommodate all this word on one line, then the browser will not draw any newline. That's it, it's simple.

Good luck to you! See you soon on the blog pages site

You may be interested

MailTo - what is it and how to create an email link in Html
Tags and attributes of headings H1-H6, horizontal line Hr, line break Br and paragraph P according to Html 4.01 standard
How to insert a link and a picture (photo) into HTML - IMG and A tags
What is Html Hypertext Markup Language and how to list all tags in W3C validator
Font (Face, Size and Color), Blockquote and Pre tags - deprecated text formatting in pure HTML (without using CSS)
How colors are set in Html and CSS code, selection of RGB shades in tables, Yandex results and other programs
Comment directives and Doctype in Html code, as well as the concept of block and inline elements (tags)
Lists in Html code - UL, OL, LI and DL tags


Top