In the previous lesson was told about the structure of the HTML-page. This lesson will cover the basic meta tags, which contains the HTML-page. Once again, that the meta tags are not displayed in the browser window, and contain the instructions for the browser and search engines.
- Encoding HTML-page.
- Language HTML-page.
- Title HTML-page.
- Description of HTML-page.
- Keywords HTML-page.
Meta tags are in the container HEAD and go right behind TITLE.
Encryption page tells the browser which character set to use when displaying the page. If encoding is not specified, the browser will attempt to determine its own, which can cause incorrect display of HTML-page content.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - HTML4 <meta charset="UTF-8"> - HTML5
In HTML5 is given short information that simplifies the work of webmasters and provides backward compatibility with earlier versions of HTML.
The most popular encoding is UTF-8 (Unicode) - a universal encoding that meets the needs of most webmasters. To add as non-standard characters are not in UTF-8, you should refer to the special table, for example, XHTML Character Entity Reference
If the page encoding is not specified, it can pose a security risk for your site.
Language HTML-page. To determine the language of HTML-pages in HTML5 attribute used lang .
<meta lang = "en"> - English; <meta lang = "ru"> - Russian; <meta lang = "es"> - Spanish; <meta lang = "it"> - Italian; <meta lang = "de"> - German; <meta lang = "fr"> - French; <meta lang = "uk"> - the Ukrainian language; <meta lang = "pl"> - Polish;
Two meta tag that we considered necessary for the correct display of the contents of HTML-page in a browser window. The following meta tags to be considered, designed for the search engines.
<meta name="Title" content="***"> <meta name="description" content="***"> <meta name="keywords" content="***">
- name="Title" - HTML-page headline, usually duplicates the information tag TITLE.
- name="description" - Summary page if this tag is not present, the search engine as annotations will start a piece of text pages that sometimes undesirable;
- name="keywords" - keywords for a particular HTML-pages which are listed separated by commas, they must be simple and must describe the nature of the page.
<!DOCTYPE HTML> <html> <head> <title>Education HTML</title> <meta charset="UTF-8"> <meta lang="en"> <meta name="Title" content="Education HTML"> <meta name="description" content="Lessons for the study of HTML"> <meta name="keywords" content="html, Lessons html"> </head> <body> I learned Main metatags! </body> </html>