Correspondence on the semantics of HTML code with examples. Coding semantic layout - what is it

(substitutions). In the replacement ciphers, the letters change to other letters from the same alphabet, when encoding letters change to something completely different - pictures, symbols of other alphabets, sequences of various signs, etc. The table of unique compliance of the source text and code symbols is compiled, and in accordance with this table, one to one encoding occurs. To decode, you need to know the code table.

There are a large number of codes used in different fields of human life. Well-known codes are used for the most part for the convenience of transmitting information in one way or another. If the code table is known only to the transmitter and receiving, then a pretty primitive cipher is obtained, which is easily led by frequency analysis. But if a person is far from the theory of coding and not familiar with the frequency analysis of the text, then such ciphers are pretty problematic.

A1Z26.

The simplest cipher. Called A1Z26 or in the Russian version A1Y33. The letters of the alphabet are replaced with their sequence numbers.

"Nozdr" can be encrypted as 14-15-26-4-18 or 1415260418.

ABC Morse

Letters, numbers and some signs are associated with a set of points and dashes, which can be transmitted on the radio, sound, knock, light telegraph and dishlable flags. Since the appropriate flag is associated with each letter, the corresponding flag is associated with each letter, you can send a message to flags.

Braille

Brill is a tactile reading system for blind, consisting of six-point signs called cells. The cell consists of three points in height and of two points in width.

Various braille signs are formed by placing points into different positions inside the cell.

For convenience, the point is described when reading as follows: 1, 2, 3 on the left from top to bottom and 4, 5, 6 to the right from top to bottom.

When drawing up text, the following rules are drawn:

    between words is passed one cell (space);

    after the semicolons and the point with the semicolons is not skipped;

    a dash is written in a punk with the previous word;

    before the number is made of a digital sign.

Code Pages

In computer quests and mgars, you can encode letters in accordance with their codes in various code pages - tables used on computers. For Cyrillic texts, it is best to use the most common encodings: Windows-1251, Koi8, CP866, MacCyrillic. Although for complex encryptions, you can choose something more exotic.

You can encode hexadecimal numbers, and you can translate them into decimal. For example, the letter in KOI8-R has code B3 (179), in CP866 - F0 (240), and in Windows-1251 - A8 (168). And you can give letters in the right tables to seek compliance in the left, then the text will be dialed by the "krakoyabram" type èαᬫº∩íαδ (866 → 437) or Êðàêîçÿáðû (1251 → Latin-1).

And you can change the upper half of the characters to the lower one inside the same table. Then for Windows-1251, instead of "Krakozyabry", the JP JNG AP (", instead of the" helicopter "-" BEPRNK (R ". Such a shift in the code page is the classic loss of a senior bit in case of failures on mail servers. Latin characters at the same time You can encode down to 128 characters. And such an encoding will be an encipher option - Rot128, only not for a conventional alphabet, but for the selected code page.

The exact time of the origin of the cipher is unknown, but some of the records found this system are dated XVIII century. Variations of this cipher were used by the Order of Rosenkrayers and Masons. The latter used it in their secret documents and correspondence quite often, so the cipher and began to call the media cipher. Even on the tombstones of Masons, you can see the inscriptions using this cipher. A similar encryption system was used during the US Civil War in the US Army George Washington, as well as prisoners in the Federal Converations of Confederations of the United States.

Below are two (blue and red) options for filling the grid of such ciphers. The letters are arranged in pairs, the second letter from the pair is drawn by the symbol with the point:

Copyright

Enciphers, where one symbol of the alphabet (letter, digital, the punctuation) corresponds to one (less often more) a graphic sign, a great set is invented. Most of them are invented for use in fantastic films, cartoons and computer games. Here is some of them:

Dacificent men

One of the most famous author's substitution ciphers is "". He was invented and described by the English writer Arthur Conan Doyle in one of his works about Sherlock Holmes. The letters of the alphabet are replaced with symbols similar to men in different poses. In the book, the little men were invented not for all the letters of the alphabet, so the fans were creatively finalized and the symbols were reworked, and it turned out such a cipher:

Thomas Mora alphabet

But such an alphabet described in his treatise "Utopia" Thomas Mor in 1516:

Ciphers from the animated series "Gravity Falls"

Bill Schifra

Stanford Pineza (author of diaries)

Jedician alphabet from "Star Wars"

Alphabet Alphabet from Futurama

Krypton Alphabet Superman

Bionic alphabets

The semantics of the HTML code is always a hot question. Some developers try to always write semantic code. Others criticize dogmatic adherents. And some not even have no idea what it is and why it is necessary. Semantics is defined in HTML in tags, classes, IDs, and attributes that describe the purpose, but do not specify exactly the content that is concluded. That is, it is about separating the content and its format.

Let's start with the obvious example.

Bad semantics code

Title Articles
And the author
Inco Gnetito.

Good semantics code

Title Articles

The text of the article that is written by someone. Inco Gnito - her author.

Regardless of whether you consider HTML5 ready for use or not, for sure the use of the tag

In this case it will be more attractive than the usual
indicating class. The title of the article becomes a title, the content becomes a paragraph, and the text highlighted by boldly becomes the tag .

But not everything is so clearly represented by HTML5 tags. Let's look at the set of class names and understand whether they meet the requirements of semantics.

Not semantic code. This is a classic example. Each CSS working environment for a modular grid uses this type of classes names to determine the grid items. Will it be "yui-b", "grid-4", or "spanhalf" - such names closer to the markup task than to the content description. However, their use in most cases is inevitable when working with modular grids templates.

Semantic code. The footer has acquired a steady value in web design. This is the lower part of the page that contains elements such as repetitive navigation, the rights of use, information about the author and so on. This class determines the group for all these elements without their description.

If you switched to the use of HTML5, then it is better to apply an item

in such cases. The remark also concerns all other parts of the web page (the top footer should be
, side panel -