An example of using the meta element

One way to use the meta tag is to specify the HTTP headers that must be sent to the client before the actual web page is sent. For example:

< meta http-equiv = "Content-Type" content = "text / html" />

Such an entry indicates that the page should be sent along with the HTTP header Content-Type: text / html. This header specifies the type of document to be sent to the browser or another program. However, although it was initially assumed that web servers will read meta tags inside the web pages sent to the client, and form HTTP headers depending on their content, in practice this is not implemented in the most used web servers, respectively , Web servers do not change HTTP headers that are sent to the client, and the client (web browser) processes these meta tags independently (in particular, data from meta tags can replace data received from HTTP headers).

In addition, meta tags can be used to inform the browser about the document when HTTP headers are not available (for example, if the page is opened locally from the disk, and not downloaded from the web server).

In the general form, the metadata is written as follows: the meta tag specifies the name attribute and the associated content attribute, which describes an aspect of the web page, for example, keywords:

< meta name = "keywords" content = "Abgemacht, testing tool" />