What Are Tags And How To Use Them

Table of contents:

What Are Tags And How To Use Them
What Are Tags And How To Use Them

Video: What Are Tags And How To Use Them

Video: What Are Tags And How To Use Them
Video: HOW TO USE YOUTUBE TAGS 2021: What Are Tags, Do Tags Matter + Common Mistakes | YouTube 101 2024, December
Anonim

The internet is based on html, a hypertext markup language. By "hypertext" is meant text that includes links. It was the simple ability to move from one page to another, from one site to another that transformed computer technology. The simplicity of html is achieved by a convenient developer tool - tags.

What are tags and how to use them
What are tags and how to use them

Tags in html

Tags in html are a means of semantic (semantic) formatting, presentation and communication of information. Any tag must be located between the characters:. All html tags are understood by most of the existing browsers. The international organization W3C is responsible for the standardization and creation of new tags - there you can also find out about all existing html tags. Tags can work only inside the "main" tag of an html document - HTML. The HEAD and BODY tags separate the web page into two logical parts. In HEAD, you can influence the page title (displayed on the browser tab), while BODY is "responsible" for all the semantic content of the page.

Single and paired tags

All html tags can be divided into paired and single tags. Single tags are used only when paired tags are useless. For example, BR is a single tag, which is an empty string. If you write this tag in html-code, you will be able to see the separator string in the browser. It is usually used to separate one group of information from another.

Paired tags are used to organize content. Text information, file addresses, links are placed between the tags P (paragraph of text), IMG (image), A (hyperlink).

Tag attributes

Some tags have special attributes that affect the "behavior" of the element. Some of the tags in the modern html5 specification make it possible to dispense with previously required programming for common tasks.

For example, the FORM tag (input field) has a PLACEHOLDER attribute that replaces the text field with "test information" with prompts. If a web developer wants the field for entering the name not to be empty, but would display an example of a name, he can set the PLACEHOLDER attribute to "Ivanov Ivan". Then “Ivanov Ivan” will be displayed in the text field for entering the name - until the user moves the cursor to this field. The inscription will disappear and he will be able to enter his name.

Linking with CSS

A relatively new technology (compared to html) for presenting sites on the Internet is CSS. The acronym CSS hides cascading style sheets. Before their appearance, webmasters used to divide the site into a logically clear table structure (TABLE tag). Now site creators have the opportunity to place everything related to the presentation of the site (including the location of blocks) in a special style css file. To connect a style sheet to an html document, you need to specify the address of the css file on the server in the LINK pair tag.

Recommended: