November 02, 2023  SEONews

HTML Element: meta | Envato Tuts+


The <meta> element in HTML is a metadata tag that provides structured information about the document, such as character encoding, authorship, and viewport settings. It plays a crucial role in enhancing the accessibility and functionality of web pages.

Syntax

The <meta> element is self-closing and has no closing tag. It is placed within the <head> section of an HTML document. Here’s a basic syntax example, showing two <meta> tags, with various attributes:

1

<!DOCTYPE html>

2

<html>

3

<head>

4

<meta charset="UTF-8" />

5

<meta name="description" content="A description of the web page" />

6

</head>

7

<body>

8

<!-- web page content goes here -->

9

</body>

10

</html>

Examples

The <meta> element can be used for specifying the character encoding of a web page:

1

<!DOCTYPE html>

2

<html>

3

<head>

4

<meta charset="UTF-8" />

5

<title>My Website</title>

6

</head>

7

<body>

8

<!-- web page content goes here -->

9

</body>

10

</html>

In this example, the <meta> element with the charsetattribute is used to specify that the character encoding for the web page is UTF-8, which can handle a wide range of characters and symbols.

Browsers tend to use UTF-8 by...



source: https://news.oneseocompany.com/2023/11/02/html-element-meta-envato-tuts_2023110252078.html

Your content is great. However, if any of the content contained herein violates any rights of yours, including those of copyright, please contact us immediately by e-mail at media[@]kissrpr.com.