The HTML file is an ordinary text document in which with the help of a special descriptor specify the location of content items relative to each other or browser window. To view a job file through the Internet browser. To edit the HTML code, you can use a text editor or pick up a special program with features such as auto insertion, and syntax highlighting. An example of an application well suited for convenient operation with such instruments is Sublime Text 2.
When you use the code editor in the main menu, select File (File) - Save As ("Save as..."). In the dialog box, you'll need to specify the directory to save the file, and the name and extension. You can convert a text document into an HTML page by writing the end of a filename extension html.
There are a number of situations where even a properly created file with the correct extension does not open in browser. The reason for this is the incorrect design of the structure of the HTML code. There are a number of mandatory rules, without observance of which the Internet page does not display correctly or does not open.
<DOCTYPE!> though not mandatory, but its presence helps the browser to correctly interpret the code and recognize the structure of the document. Sometimes the reason for the incorrect display of the web page is the absence or incorrect spelling of this tag.
The paired <html> </html> is the descriptor, which is all the contents of the web page. The code elements that are outside of this tag are displayed as plain text or blocked browser, except <DOCTYPE!>. Handle <html> is mandatory and can not be used on the page more than once.
Between the tags <body> and </body> is enclosed the body of the site - information that is displayed on the user's screen. It can be headings, subheadings, paragraphs and lines of text, images, video, or other multimedia objects. The descriptor is mandatory. In addition, it can be used by other elements <header>, <article> or <footer>. They do not affect the displayed result, but to create a structure of HTML code, which is considered good practice in the circles of web developers or web designers.
To the <body> tag you can apply attributes, set properties for all elements of the same type on the page. This is useful if the page you want to change the color of all the text or set the background for the site.