Sports statistics
Line 1 (syntax example) is a minimal demonstration line used to illustrate how inline HTML elements, such as the <span>...</span> tag, can be embedded inside wiki or HTML content to change styling, language attributes, or other metadata without breaking the surrounding text flow.[1]
A common example of such a line is:
Line<span>1</span> Change <span lang="de">A</span>
In most rendering contexts, this will simply appear to the reader as:
- Line1 Change A
Usage
[edit | edit source]Inline <span>...</span> elements are often used on HTML-based systems, including MediaWiki (the software behind Wikipedia), to apply styling or metadata to specific parts of a line. The example line
Line<span>1</span> Change <span lang="de">A</span>
contains two spans:
- A neutral span around the character "1", which could be used for styling (for example, via a CSS class).[2]
- A span with a language attribute,
lang="de", marking the letter "A" as German-language content.
The language attribute can influence:
- Screen reader pronunciation;
- Hyphenation rules;
- Spellchecking behavior, depending on the browser and tools being used.[3]
Relation to wiki markup
[edit | edit source]While basic wiki markup is usually preferred for formatting text (such as italic or bold), inline HTML can be used in cases where wiki syntax does not provide fine-grained control. For example:
- Marking a single character as a different language;
- Applying a CSS class for advanced layout in templates;
- Wrapping small pieces of text for JavaScript hooks.[4]
The example line can appear inside templates, infoboxes, or tables without affecting surrounding lines or paragraphs, which is why a compact form such as "Line 1 Change A" is often used in documentation.
Accessibility considerations
[edit | edit source]Correct use of the lang attribute, as seen in the fragment <span lang="de">A</span>, is recommended by accessibility guidelines such as Web Content Accessibility Guidelines (WCAG). It helps assistive technologies:
- Announce the right language;
- Switch pronunciation rules;
- Provide more accurate support for users with screen readers.[5]
Editors are generally encouraged to:
- Use language tags on short phrases, proper names, and quotations in a foreign language;
- Avoid unnecessary inline HTML where standard wiki markup is sufficient.
See also
[edit | edit source]References
[edit | edit source]- ↑ "Help:Advanced text formatting". Wikipedia. Retrieved 2025-12-13.
- ↑ "The span element". W3C HTML Living Standard. Retrieved 2025-12-13.
- ↑ "Language tags in HTML and XML". W3C. Retrieved 2025-12-13.
- ↑ "Help:HTML in wikitext". Wikipedia. Retrieved 2025-12-13.
- ↑ "WCAG 2.1: Language of Parts". W3C. Retrieved 2025-12-13.