These attributes offer additional information about the character sets and language used in linked documents or external scripts.

Related elements:

charset attribute:

A, LINK, SCRIPT

hreflang attribute:

A, LINK

Attribute characteristics and purpose:

charset attribute:

  • specifies a character encoding group of the resource defined by the linking element

hreflang attribute:

  • specifies the base language of the resource defined by the href attribute
  • can be used only in combination with the href attribute

Example

HTML language attributes:

 

›› go to examples ››