What is tags and as to use them

What is tags and as to use them

Digital Hits: 86

The Internet is founded on html - language to a hypertext marking. "Hypertext" is meant as the text including links. Simple possibility of transition from one page on another, from one website on the second changed computer technologies. Simplicity of HTML is reached by the convenient tool of the developer - tags.

Tags in html


Tags in html - means of semantic (semantic) formatting, representation and communication of information. Any tag should be located between characters: <i>. All tags of HTML are understood by the majority of the existing browsers. The international organization W3C is engaged in standardization and creation of new tags - in the same place it is possible to learn about all existing tags of HTML. Tags can work only in the "main" tag of HTML document - HTML. The web page is separated by the HEAD and BODY tags into two logical parts. In HEAD it is possible to affect page heading (it is displayed on a browser tab), BODY "is responsible" for all semantic content of the page.

Single and pair tags


All tags of HTML can be separated into pair and single. Single tags are used only when it is senseless to use steam rooms. For example, the BR tag representing a blank line is single. If you register this tag in HTML code, you will be able to see a line divider in the browser. It is usually used for separation of one group of information from another.

 

Pair tags are used for the organization of content. Text information, the addresses of files, references are placed between tags P (paragraph of the text), IMG (image), A (hyperlink).

Tag attributes


Some tags have the special attributes affecting "behavior" of an element. Some tags of modern html5 specification allow to do without programming necessary earlier for the solution of widespread tasks.


For example, the FORM tag (data entry field) has the PLACEHOLDER attribute which substitutes a text box with "test information", hints. If the web developer wants that the field for input of a name was not empty, and would display an example of a name, he can assign to the PLACEHOLDER attribute Ivan Ivanov value. Then in a text box for input of a name "Ivan Ivanov" - will be brought until the user does not transfer the cursor to this field. The inscription at the same time will be gone, and it will be able to enter the name.

Communication with CSS


Rather new technology (in comparison with html) representations of the websites on the Internet is CSS. Cascading style sheets "are" behind an abbreviation of CSS. Before their emergence the webmasters used for division of the website into logically clear structure of the table (TABLE tag). Now creators of the websites had an opportunity everything, belonging to representation of the website (including arrangement of blocks), to place in the special style css-file. For connection of the style table to HTML document it is necessary to specify in the pair LINK tag the css file address on the server.

Author: «MirrorInfo» Dream Team

Print