Not all characters that you see on the keyboard are allowed in the body of an HTML document. However, this is logical. If each tag starts with a (<) и заканчивается символом (>), then it is quite logical that these characters cannot be specified inside ordinary text. These characters have special meaning in HTML documents. When the browser sees them it thinks they are HTML tags and tries to interpret them as such.
To solve the problem of adding characters that are prohibited for input in the text of an HTML document, a set of special characters was developed - sequences that replace characters that are prohibited from keyboard input. Characters that are not present on your keyboard can also be replaced with special characters. Each such sequence (mnemonic reference) necessarily begins with an ampersand (&) and ends with a semicolon (;). Between (&) and (;) you can enter:
- special character name (& name;);
- a numeric code that is entered after the ‰ () sign, that is, when typing a special character by specifying its numeric code, you must use the following notation: (& code;);
For example, to display a less than sign (<) мы должны написать: < (symbol name) or & 60;(numeric code in decimal) or & x0003C;(numeric code in hexadecimal system).
Non-breaking space
The main purpose of the non-breaking space () (by non-breaking space) - separate words, but prohibit line breaks in this place. Since the size of the browser window is not constant, the transition to a new line in the paragraph occurs automatically. In this case, the browser will break the line anywhere there is a space or a hyphen. According to the spelling rules, there are language constructs that cannot be torn apart. Non-breaking space designs include, for example:
- surnames with initials;
- em dashes with the word preceding them;
- monosyllabic words followed by a word;
- numbers followed by units.
- 15 m / s
- 100 km / h
As you already know, in HTML, several consecutive ordinary spaces are replaced with a single space. If you write 10 spaces in the text, the browser will remove 9 of them. To add real spaces in the text, you can use a non-breaking space () .
Quotes.
There are three types of quotation marks in printing: double angle quotation marks or herringbones (""), typographic quotation marks (“”), and handwritten feet (“”). When working with code, you will use straight double quotation marks ("") and single straight quotation marks ("").
By tradition, in Russian, the main type of quotation marks is “Christmas trees”. In HTML, Christmas trees correspond to symbols «
and »
... Many publications also use typographic quotation marks and double straight quotation marks instead of "Christmas trees".
The left and right typographic quotation marks match the characters “
and ”
respectively, and the bottom left quote is „
.
Direct double quotes match a special character "
.
The use of special quotation marks is shown in the following example:
Example: Using Quotes
Hyphen and dash.
In printing, there are three very similar characters to each other: em dash, en dash and hyphen. Of these, there is only one on the computer keyboard - a hyphen. It is he who is usually used in all cases when a hyphen or dash needs to be put in the text. However, you should follow certain punctuation rules regarding the use of these characters.
For example, the hyphen (-) is used only within words or between numbers. An em dash (-) is placed between words in a sentence and separated from these words by spaces. An em dash corresponds to a mnemonic link —
... An em dash (-) is used between numbers without letters or between words that are typed in capital letters, and is also used as a minus sign in mathematical formulas. There is no space between the em dash and the words. An em dash corresponds to a mnemonic link -
.
The use of hyphens and dashes is shown in the following example:
Example: Special characters - and -
- Try it yourself "
Time is money...
The web page takes too long to open.
It should load in 2-4 seconds.
Time is money...
Symbol | Description | Mnemonic name | Numeric Code |
---|---|---|---|
non-breaking space | < | less than | < |
> | more than | > | > |
& | ampersand | & | & |
" | straight double quote | " | " |
" | apostrophe | " | " |
« | left double angle quotation mark | « | « |
» | right double angle quotation mark | » | » |
‘ | left single quote | ‘ | ‘ |
’ | right single quote | ’ | ’ |
‚ | bottom single quote | ‚ | ‚ |
“ | left double quote | “ | “ |
” | right double quote | ” | ” |
„ | bottom double quote | „ | „ |
€ | euro | € | € |
copyright | © | ||
® | registered trade mark | ® | ® |
Varieties of special characters
On a regular keyboard, you will not find most of the mathematical, technical, geometric and other special characters.
To apply such characters in an HTML page, you can use their corresponding mnemonic names.
In the following example, you can see how the same symbol can be displayed using different codes.
Special characters are technical characters that are not represented on the keyboard and are encoded using UNICOD or other metalanguage encoding. Special characters are divided into groups: mathematical, Greek alphabet, ISO 8859-1 and others. Why they are needed and how to use, read further in the article.
Using special characters when writing documents
The use is carried out for the following purposes:
- Giving the article completeness and aesthetics. Special signs help you quickly understand the dimensions or read the historical name in Latin or Greek.
- Several elements provide the correct layout for the document. For example, “” and “” are different, the former are transmitted by standard means, others through special characters.
- Layout of documents of a mathematical orientation cannot do without knowledge of the main groups of elements.
Basic signs
The material will allow you to find special characters in the appropriate encoding for quick insertion into the text.
Appearance | Designation | Html code | CSS code |
☃ | snowman | ☃ | \2603 |
☦ | Orthodox cross | ☦ | \2626 |
⚓ | Anchor | ⚓ | \2693 |
✆ | Telephone sign | ✆ | \2706 |
☎ | Telephone | ☎ | \ 260E |
☕ | Hot drinks | ☕ | \2615 |
✎ | Pencil pointing right and down | ✎ | \ 270E |
✏ | Pencil | ✏ | \ 270F |
✐ | Pencil pointing right-up | ✐ | \2710 |
✑ | Open nib | ✑ | \2711 |
✒ | Shaded nib | ✒ | \2712 |
⚜ | Heraldic lily | ⚜ | \ 269C |
⛑ | Helmet with a white cross | ⛑ | \ 26D1 |
⚝ | Traced white star | ⚝ | \ 269D |
❄ | Snowflake | ❄ | \2744 |
❤ | Painted over fat heart | ❤ | \2764 |
❅ | Snowflake trapped by shamrocks | ❅ | \2745 |
❆ | Bold acute-angled snowflake | ❆ | \2746 |
★ | Shaded star | ★ | \2605 |
☆ | Unpainted star | ☆ | \2606 |
✪ | An open star in a filled circle | ✪ | \ 272A |
✫ | A filled star with an open circle inside | ✫ | \ 272B |
✯ | Spinning star | ✯ | \ 272F |
❉ | Spherical star | ❉ | \2749 |
❋ | Bold eight-pointed teardrop-shaped propeller star | ❋ | \ 274B |
✲ | An asterisk with an open center | ✲ | \2732 |
☀ | Shaded sun with rays | ☀ | \2600 |
☁ | Clouds | ☁ | \2601 |
☂ | Umbrella | ☂ | \2602 |
☑ | Check mark in the square | ☑ | \2611 |
☒ | Cross in a square | ☒ | \2612 |
☹ | Frowning emoticon | ☹ | \2639 |
☺ | Smiling emoticon | ☺ | \ 263A |
☻ | Painted over smiling emoticon | ☻ | \ 263B |
☭ | Hammer and sickle | ☭ | \ 262D |
⚑ | Painted flag | ⚑ | \2691 |
⚐ | Unfilled flag | ⚐ | \2690 |
☰ | Trigram | ☰ | \2630 |
✿ | Painted flower | ✿ | \ 273f |
❀ | Unpainted flower | ❀ | \2740 |
✾ | Flower with six petals | ✾ | \ 273E |
❁ | Filled outlined flower | ❁ | \2741 |
❂ | Flower of dots | ❂ | \2742 |
✉ | Envelope | ✉ | \2709 |
❦ | Heart in the form of a flower | ❦ | \2766 |
❶ | Number 1 | ❶ | \2776 |
❷ | Number 2 | ❷ | \2777 |
❸ | Number 3 | ❸ | \2778 |
❹ | Number 4 | ❹ | \2779 |
❺ | Number 5 | ❺ | \ 277A |
❻ | Number 6 | ❻ | \ 277B |
❼ | Number 7 | ❼ | \ 277C |
❽ | Number 8 | ❽ | \ 277D |
➒ | Number 9 | ➒ | \2792 |
➓ | Number 10 | ➓ | \2793 |
✖ | Bold multiplication sign | ✖ | \2716 |
✘ | Bold cross | ✘ | \2718 |
✔ | Bold check mark | ✔ | \2714 |
✚ | Bold cross | ✚ | \ 271A |
⚛ | Atom symbol | ⚛ | \ 269B |
♺ | Recycling symbol | ♺ | \ 267A |
❑ | Unfilled square with lower right shadow | ❑ | \2751 |
❒ | Unfilled square with upper right shadow | ❒ | \2752 |
◈ | Rimmed diamond | ◈ | \ 25C8 |
◐ | Circle with left half filled | ◐ | \ 25D0 |
◑ | Circle with filled right half | ◑ | \ 25D1 |
⁂ | Three stars | ⁂ | \2042 |
Punctuation marks
Appearance | Designation | Html code | CSS code |
< | Less than sign (start of tag) | < | \ 003C |
> | Greater than sign (end of tag) | > | \ 003E |
« | Left double angle bracket | « | \ 00AB |
» | Right double angle bracket | » | \ 00BB |
‹ | Left angle single quote | ‹ | \2039 |
› | Right angle single quote | › | \ 203A |
« | Double quote | " | \0022 |
′ | Single stroke | ′ | \2032 |
″ | Double stroke | ″ | \2033 |
‘ | Left single quote | ‘ | \2018 |
’ | Right single quote | ’ | \2019 |
‚ | Bottom single quote | ‚ | \ 201A |
“ | Left double quote | “ | \ 201C |
” | Right double quote | ” | \ 201D |
„ | Bottom double quote | „ | \ 201E |
❜ | Bold single top comma | ❜ | \ 275C |
❛ | Bold single turned top comma | ❛ | \ 275B |
& | Ampersand | & | \0026 |
‘ | Apostrophe (single quote) | " | \0027 |
§ | Paragraph | § | \ 00A7 |
© | Copyright sign | \ 00A9 | |
¬ | Negative sign | ¬ | \ 00AC |
® | Registered trade mark sign | ® | \ 00AE |
¯ | Macron | ¯ | \ 00AF |
° | Degree | ° | \ 00B0 |
± | Plus or minus | ± | \ 00B1 |
¹ | Superscript "1" | ¹ | \ 00B9 |
² | Superscript "2" | ² | \ 00B2 |
³ | Superscript "3" | ³ | \ 00B3 |
¼ | One quarter | ¼ | \ 00BC |
½ | A half | ½ | \ 00BD |
¾ | Three quarters | ¾ | \ 00BE |
´ | Accent mark | ´ | \ 00B4 |
µ | Micro | µ | \ 00B5 |
¶ | Paragraph mark | ¶ | \ 00B6 |
· | Multiplication sign | · | \ 00B7 |
¿ | Inverted question mark | ¿ | \ 00BF |
ƒ | Florin sign | ƒ | \0192 |
™ | Trade mark sign | ™ | \2122 |
List marker | . | \2022 | |
… | Ellipsis | … | \2026 |
‾ | Overline | ‾ | \ 203E |
– | Middle dash | - | \2013 |
- | Em dash | — | \2014 |
‰ | Ppm | ‰ | \2030 |
} | Right curly brace | } | \ 007D |
{ | Left curly brace | { | \ 007B |
= | Equal sign | = | \ 003D |
≠ | Inequality sign | ≠ | \2260 |
≅ | Congruence (geometric equality) | ≅ | \2245 |
≈ | Almost equal | ≈ | \2248 |
≤ | Less than or equal | ≤ | \2264 |
≥ | Greater than or equal | ≥ | \2265 |
∠ | Injection | ∠ | \2220 |
⊥ | Perpendicular (Up Button) | ⊥ | \ 22A5 |
√ | Square root | √ | \ 221A |
∑ | N-ary summation | ∑ | \2211 |
∫ | Integral | ∫ | \ 222B |
※ | Footnote sign | ※ | \ 203B |
÷ | Division sign | ÷ | \ 00F7 |
∞ | The Infinity symbol | ∞ | \ 221E |
@ | Dog symbol | @ | \0040 |
[ | Left square bracket | [ | \ 005B |
] | Right square bracket | ] | \ 005D |
Arrows
Appearance | Designation | Html code | CSS code |
← | Left arrow | ← | \2190 |
Up arrow | \2191 | ||
→ | Right arrow | → | \2192 |
↓ | Arrow to down | ↓ | \2193 |
↔ | Left-right arrow | ↔ | \2194 |
↵ | Down Arrow and Left Arrow - Carriage Return | ↵ | \ 21B5 |
⇐ | Double arrow to the left | ⇐ | \ 21D0 |
⇑ | Double up arrow | ⇑ | \ 21D1 |
⇒ | Double arrow to the right | ⇒ | \ 21D2 |
⇓ | Double down arrow | ⇓ | \ 21D3 |
⇔ | Left-Right Double Arrow | ⇔ | \ 21D4 |
➠ | Flying arrow | ➠ | \ 27A0 |
➤ | Arrowhead | ➤ | \ 27A4 |
➥ | Curved arrow pointing down and to the right | ➥ | \ 27A5 |
➦ | Curved boom pointing up and to the right | ➦ | \ 27A6 |
➳ | Arrow to the right | ➳ | \ 27B3 |
↺ | ↺ | \ 21BA | |
↻ | Round arrow with a counterclockwise tip | ↻ | \ 21BB |
⇧ | Thick hollow up arrow | ⇧ | \ 21E7 |
↩ | Left arrow with hook | ↩ | \ 21A9 |
➫ | Downward tilted volumetric arrow | ➫ | \ 27AB |
⬇ | Down arrow | ⬇ | \ 2B07 |
⬆ | Filled up arrow | ⬆ | \ 2B06 |
Card suits, zodiac signs and currency icons
Appearance | Designation | Html code | CSS code |
♠ | "Peaks" | ♠ | \2660 |
♣ | "Clubs" | ♣ | \2663 |
"Hearts" | \2665 | ||
♦ | "Diamonds" | ♦ | \2666 |
♡ | Contour "Hearts" | ♡ | \2661 |
♢ | Contour "Tambourines" | ♢ | \2662 |
♤ | Spades contour | ♤ | \2664 |
♧ | Contour "Clubs" | ♧ | \2667 |
¢ | Cent | ¢ | \ FFE0 |
£ | GBP | £ | \ FFE1 |
₽ | Russian ruble | ₽ | \ 20BD |
¥ | Yen or yuan | ¥ | \ 00A5 |
€ | Euro | € | \ 20AC |
$ | Dollar | $ | \0024 |
₴ | Hryvnia sign | ₴ | \ 20B4 |
₹ | Indian rupee | ₹ | \ 20B9 |
圓 | CNY | 圓 | \5713 |
₸ | Kazakhstani tenge | ₸ | \ 20B8 |
♈ | Aries | ♈ | \2648 |
♉ | Taurus | ♉ | \2649 |
♊ | Twins | ♊ | \ 264A |
♋ | Cancer | ♋ | \ 264B |
♌ | a lion | ♌ | \ 264C |
♍ | Virgo | ♍ | \ 264D |
♎ | scales | ♎ | \ 264E |
♏ | Scorpion | ♏ | \ 264F |
♐ | Sagittarius | ♐ | \2650 |
♑ | Capricorn | ♑ | \2651 |
♒ | Aquarius | ♒ | \2652 |
♓ | Fishes | ♓ | \2653 |
Greek alphabet
Letter | lowercase | uppercase | ||
symbol | html code | symbol | html code | |
α | Α | |||
β | Β | |||
γ | Γ | |||
δ | Δ | |||
ε | Ε | |||
ζ | Ζ | |||
η | Η | |||
θ | Θ | |||
ι | Ι | |||
κ | Κ | |||
λ | Λ | |||
μ | Μ | |||
ν | Ν | |||
ξ | Ξ | |||
ο | Ο | |||
π | Π | |||
ρ | Ρ | |||
σ | Σ | |||
ς | ||||
τ | Τ | |||
υ | Υ | |||
φ | Φ | |||
χ | Χ | |||
ψ | Ψ | |||
ω | Ω |
How to use in practice
Regardless of the CMS, adding an article is done using a visual editor and HTML version. All special characters in the encoding can be inserted only in the second case. To use the tools correctly, it is recommended to take note of the tables that show the code and the external view.
Please note that if you insert a sign in the visual presentation of the article, then the element will turn into the corresponding code in HTML. When entering information manually, be aware of the case, which affects the final result.
Hello dear readers of the blog site! Those who at least superficially managed to get acquainted with, probably already took note, albeit in general terms. This means 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 in HTML is, in which cases it is possible to use whitespace characters when formatting the code itself for easy reading. We will find out 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 you not to ignore the topic of using various special characters, since this is an important component that allows you to complete the study of the 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
An important point needs to be made first. The computer keyboard has special keys that allow you to implement text separation (more on this below). However, only a wide space bar provides a section between words not only in the editor, but also in the browser window. There are nuances in line wrapping and margin indentation.
As you know, the display of certain elements in a web browser is determined by tags. To format the text, a well-known one is used, which is block. That is, its content spans across the entire available width.
To wrap lines within paragraph P, you need to use a single BR tag with which you can do this. 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 hyphenation is carried out in the right places, in the browser everything will look different:
To achieve the same display in the browser window, you need to write BR in each place of the line break:
Now we have reached the completion of the task, and in the browser the verse lines will be displayed absolutely correctly:
Thus, the required 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 be convinced of 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 a browser.
Space, tab, and line break
Basically, with these whitespace characters we get to know right away how we start working with the text in the editor and format it in the desired form. To implement such a task, there are special keys, each of which corresponds to its own space character:
- Spacebar - the widest key on a computer keyboard (without an inscription);
- Tabulation - the key on the left with the inscription "Tab" and two arrows pointing in different directions;
- Line break - "Enter" key.
However, as I said above, the final desired result, not only in the text editor, but also in the browser, we get only when we use the first key. All three keys (including tabulation and line break are useful when formatting HTML code. For example, this is how a piece of code looks in NotePad ++ (there is a good deal of information about this editor) when all whitespace characters are displayed:
We get code that is easy to read and understand, thanks to the spaces. The orange arrows mark the indentation created using the Tab key, and the CR and LF characters mark line breaks using the Enter kavisha.
Containers nested inside one another are viewed, opening and closing tags are well distinguished. In this form, this code can be easily edited. Now compare it with the same code, which does not have such text splitting:
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 expose by removing all spaces from the code. This is necessary for promotion, which is very important when promoting a resource.
Special characters (or mnemonics) in HTML code
Now we will analyze in what cases it is necessary to use special characters, which I mentioned at the beginning of the article. HTML special characters, sometimes called mnemonics, were introduced to solve a long-standing problem with encodings in the hypertext markup language.
When you type on the keyboard, the characters of the language you are using are encoded. In the web browser, the typed text will be displayed in the fonts of your choice as a result of the reverse decoding operation.
The fact is that there are many such encodings, now we have no goal to parse them in detail. It's just that each of them may lack certain symbols, which, however, need to be displayed. For example, you have an urge to write single quotes or an accent mark, but these icons are trite to be absent from the set.
In order to eliminate this problem, a system of special characters was introduced, which includes a huge number of very different mnemonics. They all begin 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 notation will be valid:
But after a while, the most common symbols were assigned alphabetic 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 symbol. The list of mnemonics is very voluminous, the most commonly used HTML special characters you can find from the following table below:
symbol | code | mnemonics | description |
---|---|---|---|
non-breaking space | |||
narrow space (en-letter-wide) | |||
wide space (em-wide in the letter m) | |||
– | - | – | narrow dash (en-dash) |
- | — | — | wide dash (em -dash) |
| - | | soft transfer |
a | ́ | stress, placed after the "stressed" letter | |
© | © | copyright | |
® | ® | ® | registered trade mark |
™ | ™ | ™ | trademark mark |
º | º | º | spear of mars |
ª | ª | ª | mirror of venus |
‰ | ‰ | ‰ | ppm |
π | π | π | pi (use Times New Roman) |
¦ | ¦ | ¦ | vertical dotted line |
§ | § | § | paragraph |
° | ° | ° | degree |
µ | µ | µ | micro sign |
¶ | ¶ | ¶ | paragraph mark |
… | … | … | ellipsis |
‾ | ‾ | ‾ | overline |
´ | ´ | ´ | accent mark |
№ | № | number sign | |
🔍 | 🔍 | Magnifier (tilted to the left) | |
🔎 | 🔎 | Magnifier (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 than or equal to |
≥ | ≥ | ≥ | more or equal |
≈ | ≈ | ≈ | approximately (almost) equal |
≠ | ≠ | ≠ | not equal |
≡ | ≡ | ≡ | identically |
√ | √ | √ | square root (radical) |
∞ | ∞ | ∞ | Infinity |
∑ | ∑ | ∑ | summation sign |
∏ | ∏ | ∏ | work mark |
∂ | ∂ | ∂ | partial differential |
∫ | ∫ | ∫ | integral |
∀ | ∀ | ∀ | for everyone (visible only if in bold) |
∃ | ∃ | ∃ | exists |
∅ | ∅ | ∅ | empty set |
Ø | Ø | Ø | diameter |
∈ | ∈ | ∈ | belongs |
∉ | ∉ | ∉ | not belong |
∋ | ∋ | ∗ | contains |
⊂ | ⊂ | ⊂ | is a subset of |
⊃ | ⊃ | ⊃ | is a superset |
⊄ | ⊄ | ⊄ | is not a subset of |
⊆ | ⊆ | ⊆ | is a subset of or equal to |
⊇ | ⊇ | ⊇ | is a superset or equal to |
⊕ | ⊕ | ⊕ | plus in a circle |
⊗ | ⊗ | ⊗ | multiplication sign in a circle |
⊥ | ⊥ | ⊥ | perpendicular |
∠ | ∠ | ∠ | injection |
∧ | ∧ | ∧ | logical AND |
∨ | ∨ | ∨ | logical OR |
∩ | ∩ | ∩ | crossing |
∪ | ∪ | ∪ | Union |
currency signs | |||
€ | € | € | Euro |
¢ | ¢ | ¢ | Cent |
£ | £ | £ | Lb |
¤ | ¤t; | ¤ | Currency sign |
¥ | ¥ | ¥ | Yen and RMB sign |
ƒ | ƒ | ƒ | Florin sign |
markers | |||
. | simple marker | ||
○ | ○ | circle | |
· | · | · | midpoint |
† | † | 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 opening angle quotation mark | |
› | › | single closing angle quotation mark | |
′ | ′ | ′ | stroke (minutes, feet) |
″ | ″ | ″ | double prime (seconds, inches) |
‘ | ‘ | ‘ | upper left single quotation mark |
’ | ’ | ’ | upper right single quotation mark |
‚ | ‚ | ‚ | bottom right single quote |
“ | “ | “ | quotation mark-foot left |
” | ” | ” | quotation mark-foot upper right |
„ | „ | „ | quotation mark-foot right lower |
❛ | ❛ | single english opening quotation mark | |
❜ | ❜ | single English closing quotation mark | |
❝ | ❝ | open double quotation mark | |
❞ | ❞ | English double quotation mark closing | |
arrows | |||
← | ← | ← | left arrow |
up arrow | |||
→ | → | → | right arrow |
↓ | ↓ | ↓ | arrow to down |
↔ | ↔ | ↔ | left and right arrow |
↕ | ↕ | up and down arrow | |
↵ | ↵ | ↵ | carriage return |
⇐ | ⇐ | ⇐ | double left arrow |
⇑ | ⇑ | ⇑ | double up arrow |
⇒ | ⇒ | ⇒ | double right arrow |
⇓ | ⇓ | ⇓ | double down arrow |
⇔ | ⇔ | ⇔ | left and right double arrow |
⇕ | ⇕ | double up and down arrow | |
▲ | ▲ | triangular up arrow | |
▼ | ▼ | triangular down arrow | |
triangular right arrow | |||
◄ | ◄ | triangular left arrow | |
stars, snowflakes | |||
☃ | ☃ | snowman | |
❄ | ❄ | Snowflake | |
❅ | ❅ | Snowflake trapped by shamrocks | |
❆ | ❆ | Bold acute-angled snowflake | |
★ | ★ | Shaded star | |
☆ | ☆ | Unpainted star | |
✪ | ✪ | An open star in a filled circle | |
✫ | ✫ | A filled star with an open circle inside | |
✯ | ✯ | Spinning star | |
⚝ | ⚝ | Traced white star | |
⚪ | ⚪ | Middle open circle | |
⚫ | ⚫ | Medium filled circle | |
⚹ | ⚹ | Sextile (like a snowflake) | |
✵ | ✵ | Eight-pointed rotating star | |
❉ | ❉ | Spherical star | |
❋ | ❋ | Bold eight-pointed teardrop-shaped propeller star | |
✺ | ✺ | Sixteen-pointed asterisk | |
✹ | ✹ | Twelve-pointed filled star | |
✸ | ✸ | Bold eight-pointed rectilinear filled star | |
✶ | ✶ | Six-pointed filled star | |
✷ | ✷ | Eight-pointed rectilinear shaded star | |
✴ | ✴ | Eight-pointed filled star | |
✳ | ✳ | Eight-pointed star | |
✲ | ✲ | An asterisk with an open center | |
✱ | ✱ | Bold star | |
✧ | ✧ | Pointed four-pointed unpainted star | |
✦ | ✦ | Pointed four-pointed shaded star | |
⍟ | ⍟ | Star in a circle | |
⊛ | ⊛ | Snowflake in a circle | |
clock, time | |||
⏰ | ⏰ | Watch | |
⌚ | ⌚ | Watch | |
⌛ | ⌛ | Hourglass | |
⏳ | ⏳ | Hourglass |
Use cases for some special characters, including non-breaking space and soft hyphen
If you have already studied the table a little, then you received confirmation of the words I said above that to display all special characters, a digital code () or its alphabetic analogue (symbolic mnemonic) is used, where letters () are written instead of a combination of a 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 informational purposes, for example,
Therefore, from the same table of HTML special characters, we take the corresponding codes and the entire record will look like this:
In addition, in order to display in the browser not the ampersand sign itself, but its designation in the form , you need to add its code from the table:
footer
Then the browser will display exactly the record of mnemonics that must be used to display the FOOTER tag. A bit 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 are undesirable to separate along different lines. Let's say "1000 rubles." it would be logical to either leave it on the top line, or if there is not enough space, move the entire structure to the line below.
This is especially true if users use devices with different screen widths, including mobile ones. 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, non-breaking space HTML which I already mentioned. Let me remind you that in this case, the space code is as follows:
And it needs to be inserted between the two sets of characters that you want to connect:
RUB 1000
Now the browser will never separate them, even if the text needs to be formatted to display it correctly.
There is also a situation when a very long word does not fit into the free space and you need to transfer part of it. How, if necessary, to predetermine the line break in this case? For this there is soft carry special character-, which needs to be placed in the place where the word needs to be broken:
Longlonglonglonglongword
If a situation arises when a word needs to be transferred, then a gap is formed at the location of the mnemonic of soft transfer, where a hyphen will appear, and the rest of this word will appear on the next line below.
However, again, it will be useful to see this whole thing, including examples of indissoluble and soft transfer, to personally track in practice:
In the window of this editor, you can change the size of the "Result" viewport by grabbing the edge of this area with the left mouse button and, without releasing it, drag it to the left to decrease the width. Then a real situation arises when the browser begins to reformat the content to display it correctly.
And the transfer is carried out, which was provided in the examples I described. However, you yourself can move the viewport, expanding and narrowing it, and visually verify this.
Hello dear readers of the blog site. A little earlier, we already had time to talk about that, we also learned about the design in it. Today we have the next concept of a space 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 many additional characters to the code of a web document, like the one already mentioned above ... But first things first.
Spaces and whitespace characters in Html language
Before moving on to the issue of text formatting using specially designed tags (paragraph, headings, etc.), I want to dwell on the point how spaces, line breaks (Enter) and tabs are interpreted in the CTML language, how the breakdown is done text in the browser window when it is resized.
True, for this kind of visual formatting (which will not be visible on the web page), most often it is not the spaces themselves, but the tabulation and line break characters that are used. There is such a rule - when you start writing a nested Html tag, then indent with tabs(the Tab key on the keyboard), and when you close this tag, remove the indentation (the Shift + Tab key combination on the keyboard).
This should be done so that the opening and closing tags would be at the same vertical level (at 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 one at the same level (number of tabs), so that you do not forget to do it later.
Those. the opening and closing elements should be at the same level vertically, and the internal tags should be shifted by one tab stop and the closing and opening elements should be positioned again at the same level.
For simple web documents, this may seem overkill, but when creating more or less complex documents, they the code will become much more descriptive and readable due to the abundance of spaces, as well as it will be much easier to spot errors 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 for a long time in the hypertext markup language, associated with the used encodings.
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) by decoding.
There are a lot of encodings, but for the Html language, an extended version of encodings was adopted by default.
In this encoding of the text, it was possible to write only 256 characters - 128 from ASCII and 128 more for the letters of the Russian language. As a result, there was a problem with the use of characters on sites that are not in ASCII and are not the letters of the Russian language included in the Windows 1251 (CP1251) encoding. Well, you took it into your head to use a tilde or apostrophe, but the possibilities of this are not originally included in the encoding used by the Html language.
It is for such cases that substitutions were invented, or, in other words, mnemonics. Initially special characters were digital, but then for the most common of them, their letter counterparts were added for ease of memorization.
In general terms, 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 the Html code, extracts special characters from it. The ampersand in the numeric substitution code must be immediately followed by a pound sign "#", sometimes referred to as a hash. And only then follows the digital 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 with support for almost all unicode characters, and there are options with only a certain set of characters.
The complete list of special characters will be huge, but most commonly used mnemonics you can borrow, for example, from this table:
Symbol | Html code | Decimal code | Description |
---|---|---|---|
non-breaking space | |||
narrow space (en-letter-wide) | |||
wide space (em-wide in the letter m) | |||
– | - | – | narrow dash (en-dash) |
- | — | — | wide dash (em -dash) |
| - | | soft transfer |
a | ́ | stress, placed after the "stressed" letter | |
© | © | copyright | |
® | ® | ® | registered trade mark |
™ | ™ | ™ | trademark mark |
º | º | º | spear of mars |
ª | ª | ª | mirror of venus |
‰ | ‰ | ‰ | ppm |
π | π | π | pi (use Times New Roman) |
¦ | ¦ | ¦ | vertical dotted line |
§ | § | § | paragraph |
° | ° | ° | degree |
µ | µ | µ | micro sign |
¶ | ¶ | ¶ | paragraph mark |
… | … | … | ellipsis |
‾ | ‾ | ‾ | overline |
´ | ´ | ´ | accent mark |
№ | № | number sign | |
🔍 | 🔍 | Magnifier (tilted to the left) | |
🔎 | 🔎 | Magnifier (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 than or equal to |
≥ | ≥ | ≥ | more or equal |
≈ | ≈ | ≈ | approximately (almost) equal |
≠ | ≠ | ≠ | not equal |
≡ | ≡ | ≡ | identically |
√ | √ | √ | square root (radical) |
∞ | ∞ | ∞ | Infinity |
∑ | ∑ | ∑ | summation sign |
∏ | ∏ | ∏ | work mark |
∂ | ∂ | ∂ | partial differential |
∫ | ∫ | ∫ | integral |
∀ | ∀ | ∀ | for everyone (visible only if in bold) |
∃ | ∃ | ∃ | exists |
∅ | ∅ | ∅ | empty set |
Ø | Ø | Ø | diameter |
∈ | ∈ | ∈ | belongs |
∉ | ∉ | ∉ | not belong |
∋ | ∋ | ∗ | contains |
⊂ | ⊂ | ⊂ | is a subset of |
⊃ | ⊃ | ⊃ | is a superset |
⊄ | ⊄ | ⊄ | is not a subset of |
⊆ | ⊆ | ⊆ | is a subset of or equal to |
⊇ | ⊇ | ⊇ | is a superset or equal to |
⊕ | ⊕ | ⊕ | plus in a circle |
⊗ | ⊗ | ⊗ | multiplication sign in a circle |
⊥ | ⊥ | ⊥ | perpendicular |
∠ | ∠ | ∠ | injection |
∧ | ∧ | ∧ | logical AND |
∨ | ∨ | ∨ | logical OR |
∩ | ∩ | ∩ | crossing |
∪ | ∪ | ∪ | Union |
currency signs | |||
₽ | ₽ | Ruble. The ruble sign must be used with a skip from the number. Unicode Standard 7.0. If you don't see the image, update your Unicode fonts. | |
€ | € | € | Euro |
¢ | ¢ | ¢ | Cent |
£ | £ | £ | Lb |
¤ | ¤ | ¤ | Currency sign |
¥ | ¥ | ¥ | Yen and RMB sign |
ƒ | ƒ | ƒ | Florin sign |
markers | |||
. | simple marker | ||
○ | ○ | circle | |
· | · | · | midpoint |
† | † | 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 opening angle quotation mark | |
› | › | single closing angle quotation mark | |
′ | ′ | ′ | stroke (minutes, feet) |
″ | ″ | ″ | double prime (seconds, inches) |
‘ | ‘ | ‘ | upper left single quotation mark |
’ | ’ | ’ | upper right single quotation mark |
‚ | ‚ | ‚ | bottom right single quote |
“ | “ | “ | quotation mark-foot left |
” | ” | ” | quotation mark-foot upper right |
„ | „ | „ | quotation mark-foot right lower |
❛ | ❛ | single english opening quotation mark | |
❜ | ❜ | single English closing quotation mark | |
❝ | ❝ | open double quotation mark | |
❞ | ❞ | English double quotation mark closing | |
arrows | |||
← | ← | ← | left arrow |
up arrow | |||
→ | → | → | right arrow |
↓ | ↓ | ↓ | arrow to down |
↔ | ↔ | ↔ | left and right arrow |
↕ | ↕ | up and down arrow | |
↵ | ↵ | ↵ | carriage return |
⇐ | ⇐ | ⇐ | double left arrow |
⇑ | ⇑ | ⇑ | double up arrow |
⇒ | ⇒ | ⇒ | double right arrow |
⇓ | ⇓ | ⇓ | double down arrow |
⇔ | ⇔ | ⇔ | left and right double arrow |
⇕ | ⇕ | double up and down arrow | |
▲ | ▲ | triangular up arrow | |
▼ | ▼ | triangular down arrow | |
triangular right arrow | |||
◄ | ◄ | triangular left arrow | |
stars, snowflakes | |||
☃ | ☃ | snowman | |
❄ | ❄ | Snowflake | |
❅ | ❅ | Snowflake trapped by shamrocks | |
❆ | ❆ | Bold acute-angled snowflake | |
★ | ★ | Shaded star | |
☆ | ☆ | Unpainted star | |
✪ | ✪ | An open star in a filled circle | |
✫ | ✫ | A filled star with an open circle inside | |
✯ | ✯ | Spinning star | |
⚝ | ⚝ | Traced white star | |
⚪ | ⚪ | Middle open circle | |
⚫ | ⚫ | Medium filled circle | |
⚹ | ⚹ | Sextile (like a snowflake) | |
✵ | ✵ | Eight-pointed rotating star | |
❉ | ❉ | Spherical star | |
❋ | ❋ | Bold eight-pointed teardrop-shaped propeller star | |
✺ | ✺ | Sixteen-pointed asterisk | |
✹ | ✹ | Twelve-pointed filled star | |
✸ | ✸ | Bold eight-pointed rectilinear filled star | |
✶ | ✶ | Six-pointed filled star | |
✷ | ✷ | Eight-pointed rectilinear shaded star | |
✴ | ✴ | Eight-pointed filled star | |
✳ | ✳ | Eight-pointed star | |
✲ | ✲ | An asterisk with an open center | |
✱ | ✱ | Bold star | |
✧ | ✧ | Pointed four-pointed unpainted star | |
✦ | ✦ | Pointed four-pointed shaded star | |
⍟ | ⍟ | Star in a circle | |
⊛ | ⊛ | Snowflake in a circle | |
clock, time | |||
⏰ | ⏰ | Watch | |
⌚ | ⌚ | Watch | |
⌛ | ⌛ | Hourglass | |
⏳ | ⏳ | Hourglass |
There is a rather interesting way to get html mnemonic code for the sign 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 am using 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 from the list that opens to your Word document all the special characters you need 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 (all the same Notepad ++ will do) and you will see all the digital codes of the mnemonics you need:
The method is a bit complicated, but if you feel like using some rare special character on your website page, it will be easier than looking for tables like the one given above on the Internet. You will need to paste 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 already mentioned above and as you can see from the table of special characters given just above, some mnemonics in Html have received, in addition to digital, a symbolic designation for easier memorization. Those. instead of the pound sign "#" (hash), words are used in character variants. For example, the same non-breaking space can be written either as (numeric mnemonic) or as (symbolic).
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, display the tag< body>or you just need to insert a less than sign (<), то сделав это без использования подстановок на веб странице вы ничего не увидите, т.к. браузер, обнаружив «<» , поймет, что это Html тег, а не текст статьи.
Therefore, you will need to insert the following construction to solve a similar problem:
The same applies to the display of the code of the mnemonics themselves, because they begin with an ampersand. You will need to insert the code with the replacement of the ampersand sign by its substitution (special character) into the text:
This will need to be done in order to get on the page<, а не отображение левой угловой скобки (<), в которую преобразует браузер мнемонику <, обнаружив при разборе знак амперсанда. Хитро, но вы все поймете попробовав это на практике.
Also, you will most likely use a non-breaking space, which on the web page will look like a regular space, but the browser will not perceive it as a space character at all and will not carry out a transfer on it(for example, this will be appropriate for such phrases as 1400 GB, etc., which would not be desirable to be spread across different lines):
1400 GB.
Sometimes the opposite situation may arise, when the text contains very long words and you want to make sure that, if necessary, the browser could break these words with hyphenation... For such purposes, a special symbol "soft transfer" is provided -
Long pre-length & shyword;
If it becomes necessary to jump to another line, the browser will hyphenate instead of soft hyphenation mnemonics and send the rest of the word to the next line. If there is enough space for placing all this word on one line, then the browser will not draw any line feed. It's as simple as that.
Good luck to you! See you soon on the pages of the blog site
You may be interested
MailTo - what is it and how to create a link in Html for sending an Email
Tags and attributes of H1-H6 headings, horizontal line Hr, line break Br and paragraph P according to the Html 4.01 standard
How to insert a link and a picture (photo) into HTML - IMG and A tags
What is hypertext markup language Html and how to view a list of all tags in the W3C validator
Font (Face, Size, and Color), Blockquote, and Pre tags are legacy text formatting in pure HTML (no CSS)
How colors are set in Html and CSS code, selection of RGB shades in tables, Yandex 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 - tags UL, OL, LI and DL
A number of numbers and letters have an outwardly similar outline, hardly distinguishable with a small font size. For example, the numbers "0", "1" and the letters "O", "l" (L). This is a serious problem, especially in cases where a strictly unambiguous reading of characters is required. For example, when writing with a pen on a piece of paper or printing your alphanumeric password on a printer. The solution to this problem had to be dealt with by the first programmers and font designers (in the 20th century, at the very beginning of the computer era). For a long time already, special contrasting fonts have appeared, such as Inconsolata, Consolas (system in OS Windows), Anonymous Pro, Deja Vu Sans Mono and many others. Some of them can be downloaded for free using links from the websites of their authors and creators and from specialized Internet resources.
See an example:
http://www.levien.com/type/myfonts/inconsolata.html
If allowed by the technical conditions and the design assignment, then instead of a digital zero, "Ø" is put in the HTML code (latin capital letter O with stroke, with a slanting stroke, from the modification of the Latin alphabet for the Scandinavian languages - Norwegian and Danish), approximately similar in its in style, on a zero crossed out in half. In a text editor, such an icon is taken, copied from the Special Character table, and inserted at the desired position in the line. This life hack will be useful if you have difficulty finding and installing a special font on your device. This tip will save time and not confuse the number "0" (zero) with the letter "O", not only on your PC monitor, but also on screens of other devices, where the required font may not appear. This form of recording, traditionally, is used when designating mixed, alphanumeric information on a sheet of paper, for example, your password, access code. It is noteworthy that there is even a humorous expression "", emphasizing the importance of the presence of this element, which endows the symbol with a certain meaning and meaning. Graphical appearance of zero in different types of fonts - you can see and compare their image in pictures using a specialized service on the website page:
http://www.fileformat.info/info/unicode/char/0030/fontsupport.htm
Picture 2
When editing and editing text, strikethrough of an incorrectly written or unnecessary character is done with a large oblique cross (two criss-cross diagonal strokes of equal length). In a text editor, this is done by means of formatting - first, a fragment is selected, and then a sequence of buttons and tabs (Format - Character - Font Effects - Strikethrough) is pressed in the menu to select the desired effect from the drop-down lists. Strikethrough of one or more words in a line or in a whole paragraph of a document is done using a horizontal single or double line of sufficient thickness.
If you need to find out exactly what is written in the text - a letter or a number, then you can, in the search mode on the page, set the desired symbol and make sure that it will be found exactly there.
Instructions