Every web page must declare the language in which its content is written—whether Hebrew, English, or any other language. This is essential because screen readers rely on the language attribute to pronounce text correctly. When language is not clearly defined, screen readers may make mistakes, especially with languages that have similar phonetic patterns. For example, some screen readers might mistakenly identify German as English and read the text incorrectly.<\/p>\r\n
How do you set the language?<\/h4>\r\n
Language is defined using the The code "en" follows the ISO 639-1 standard, which defines two-letter codes for each language. Extended four-letter codes also exist (like If your page contains content in a different language—such as a Hebrew quote on an English site—define the language separately at the paragraph or element level:<\/p>\r\n On websites where content direction differs from the main site language, you should also add the CSS Beyond technical setup, all messages and text on your site must match the site's language. If your site is in English, error messages, system notifications, and explanations should all be in English. Users who don't speak the alternate language won't understand the message content, which severely impacts their ability to navigate your site.<\/p>\r\n Poor user experiences like this lead to frustration, site abandonment, and can even trigger legal concerns if accessibility failures are seen as discriminatory.<\/p>\r\n <\/p>\r\n <\/p>\r\n <\/p>\r\nlang<\/code> attribute in the <html><\/code> tag, for example:<\/p>\r\n<html<\/span><\/span> lang<\/span>="en"<\/span>><\/code><\/p>\r\nen-US<\/code>), but the shorter code is usually sufficient for most cases.<\/p>\r\n<p<\/span><\/span> lang<\/span>="he"<\/span>>זה משפט בעברית.<\/p<\/span><\/span>><\/code><\/p>\r\nDon't forget text direction<\/h4>\r\n
dir attribute to indicate text direction. For example, if your site is in English but you're including Hebrew text, the direction is right-to-left:<\/p>\r\n<span<\/span><\/span> dir<\/span>="rtl"<\/span> lang<\/span>="he"<\/span>>Remember to set both the text direction and language attribute<\/span<\/span><\/span>><\/code><\/p>\r\nKeep messaging language-consistent<\/h4>\r\n