Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7894597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:26:08+00:00 2026-06-03T07:26:08+00:00

Suppose I’m writing a document about a certain language (Spanish, say) but it’s written

  • 0

Suppose I’m writing a document about a certain language (Spanish, say) but it’s written in English. The sort of thing you’d seen in a “Teach Yourself Spanish” book.

I could see tagging the page as a whole with either:

<html lang=en>...</html>

or:

<html lang=es>...</html>

Is there a best practice for such material?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:26:10+00:00Added an answer on June 3, 2026 at 7:26 am

    The recommended way (see WCAG 2.0 Guideline 3.1 and associated technology documents) is to specify the default language of a document, here using <html lang=en> or <html lang=en-US>, and to specify any differing language of any part using lang attributes in other elements, e.g. <span lang=es>¡Comprendo!</span>.

    This is usually not very realistic in a case like this. You don’t want to add such markup by hand, and few authoring programs have handy tools for it. But if you e.g. write the text in MS Word, specify the language of parts there, using the tools of Word, to make spelling checks work well, then you could export the content into HTML format and edit it a lot, removing most of the markup generated by Word but preserving the lang attributes.

    If you wish to style Spanish text differently from English text, then lang markup is useful and you might use it even if you need to type it by hand. But using class attributes would be slightly more cross-browser (some old browsers do not support language selectors in CSS).

    Other than that, there is not much you can gain by using lang attributes. It is questionable whether you should use it at all if you would only use it on the <html> element, knowing that a very large part of the content is not in the specified language.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have 2 Arrays say : A [] => 1 2 3 4
Suppose you were writing a network-based WinForms application which is supposed to run in
Suppose i have a cookie set in first.com say user. Now i want to
Suppose that I want to customize the indentation rules of the foton document editor,
Suppose I want a string, say 123, to fill a given rectangle, like so:
Suppose: Folder - Document - Document - Folder1 - Document - Document If I
Suppose that I have a registration screen, and when the user clicks the Register
Suppose I have a table like: Tab(MyDate datetime null, MyIs bit null, ...) Then
Suppose I have the following HTML: <div id=Wrapper> <div class=MyClass></div> <div class=MyClass></div> <div class=MyClass></div>
Suppose I have a file test.c containing the following: // line 1 // line

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.