Home > Web Front-end > Front-end Q&A > What does lang mean in html?

What does lang mean in html?

WBOY
Release: 2021-12-21 18:12:55
Original
10111 people have browsed it

lang in html is the abbreviation of "language", which means language. It is used to specify the language of element content. The syntax is "<element lang="language_code"><element lang="language_code">", the language of Chinese The code is represented by "zh-CN". <element lang="language_code">

What does lang mean in html?

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What is the meaning of lang in html

In html, lang is the abbreviation of English language, which means language.

The lang attribute of HTML can be used to declare the language of a web page or part of a web page, which is helpful for search engines and browsers.

According to W3C recommendations, you should declare the primary language in each page through the lang attribute in the tag.

The syntax is as follows:

<element lang="language_code">
Copy after login

The example is as follows:

<html>
<body>
<p>This is a paragraph.</p>
<p>Ceci est un paragraphe.</p>
</body>
</html>
Copy after login

Output result:

What does lang mean in html?

Recommended tutorial: "html video tutorial"

The above is the detailed content of What does lang mean in html?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template