# HTML lang attribute

**URL:** <https://forum.freecodecamp.org/t/html-lang-attribute/787668>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [May 3, 2026, 3:13am UTC](https://forum.freecodecamp.org/t/html-lang-attribute/787668 "2026-05-03T03:13:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melody-Maker](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/melody-maker/32/371525_2.png) [@Melody-Maker](https://forum.freecodecamp.org/u/Melody-Maker)\
**Post date:** [May 3, 2026, 3:13am UTC](https://forum.freecodecamp.org/t/html-lang-attribute/787668/1 "2026-05-03T03:13:13Z")

</div>

How do you do the lang=en attribute and value inside an HTML tag? I mean, how do you type it?

---

<div class="post-metadata">

**Author:** ![gokdemiraytacpro](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gokdemiraytacpro/32/379197_2.png) [@gokdemiraytacpro](https://forum.freecodecamp.org/u/gokdemiraytacpro)\
**Post date:** [May 3, 2026, 9:21am UTC](https://forum.freecodecamp.org/t/html-lang-attribute/787668/2 "2026-05-03T09:21:50Z")

</div>

Hi @**[Melody-Maker](https://forum.freecodecamp.org/u/melody-maker)**,

To insert the attribute `lang="en"` into an HTML tag, you simply write it inside the opening tag, like any other attribute.

For example:

```auto

```

```auto
<html lang="en">

```

Here:

- `lang` is the name of the attribute

- `"en"` is its value (to indicate that the content is in English)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [May 31, 2026, 9:22am UTC](https://forum.freecodecamp.org/t/html-lang-attribute/787668/3 "2026-05-31T09:22:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
