Fundamentals
Label languages in AI-assisted HTML drafts
Mark the page language and any mixed-language passages that readers or assistive tools need to distinguish.
Tell the assistant which parts should stay in each language
A bilingual page might use English navigation with a Spanish excerpt from an original interview. Identify the primary page language, specify which passages remain as supplied, and explain how to present translations. The W3C guide to language declarations describes how HTML can identify the language of a page or a specific element. This helps software interpret the text appropriately. 1
Keep original and translated text in a predictable order
A consistent reading sequence matters when someone reads the page without seeing its columns or labels. Put a translation beside its original in the actual document order if readers need both to understand it. Use visible labels when they help a reader distinguish sections. W3C’s meaningful-sequence guidance explains why visual layout alone cannot supply a reading order. 2
Test the prompt using an exception
Choose a sample that includes a proper name, a quoted sentence, and two headings. Ask the assistant which items should be translated, preserved, or annotated. Inspect the relevant HTML attributes and read the page as rendered. If a translation alters a title that needs to remain searchable, revise the instructions to name the kind of title covered. A prompt should state the desired output and any preservation constraint in clear language. 3