این ترجمه ناقص است. لطفاً در ترجمه این مقاله از انگلیسی کمک کنید.

المان <html> المان ریشه (المان مرتبۀ بالای) یک سند HTML را نمایش میدهد، بنابراین معمولاً به آن «المان ریشه» گفته میشود. تمام المان های دیگر، فرزندان این المان محسوب میشوند.

دسته بندی هیچ
محتوای قابل قبول

یک المان <head> که به دنبال آن یک المان <body> آمده است.

امکان حذف تگ ها

اگر اولین چیزی که در المان <html> قرار میگیرد، کامنت نباشد، میتوان تگ ابتدا را ننوشت.
اگر المان <html>  بلافاصله بعد از یک کامنت نیامده باشد، میتوان تگ انتها را ننوشت.

والدین قابل قبول

هیچ. این المان، المان ریشۀ سند است.

نقش های مجاز ARIA هیچ
رابط DOM HTMLHtmlElement

صفت ها

این المان شامل صفت های کلی میشود.

manifest
Specifies the URI of a resource manifest indicating resources that should be cached locally. See Using the application cache for details.
version
Specifies the version of the HTML Document Type Definition that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.
xmlns
Specifies the XML Namespace of the document. Default value is "http://www.w3.org/1999/xhtml". This is required in documents parsed with XML parsers, and optional in text/html documents.

مثال

<!DOCTYPE html>
<html lang="en">
  <head>...</head>
  <body>...</body>
</html>

Accessibility concerns

Providing a lang attribute with a valid IETF identifying language tag on the <html> element will help screen reading technology determine the proper language to announce. The identifying language tag should describe the language used by the majority of the content of the page. Without it, screen readers will typically default to the operating system's set language, which may cause mispronunciations.

Including a valid lang declaration on the <html> element also ensures that important metadata contained in the page's <head>, such as the page's <title>, are also announced properly.

Specifications

Specification Status Comment
HTML Living Standard
The definition of '<html>' in that specification.
Living Standard  
HTML5
The definition of '<html>' in that specification.
Recommendation Added support for the manifest attribute (deprecated later).
Obsoleted the version attribute
HTML 4.01 Specification
The definition of '<html>' in that specification.
Recommendation Deprecated the version attribute

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
htmlChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
manifest
Deprecated
Chrome Full support 4Edge Full support YesFirefox Full support 3.5
Full support 3.5
Partial support 3
Notes
Notes Versions of Firefox prior to 3.5 ignore the NETWORK and FALLBACK sections of the cache manifest file.
IE Full support 10Opera Full support 10.6Safari Full support 4WebView Android Full support 4Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 11Safari iOS Full support 3.2Samsung Internet Android Full support Yes
version
Deprecated
Chrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
xmlnsChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
See implementation notes.
See implementation notes.

See also

  • MathML top-level element: <math>
  • SVG top-level element: <svg>

Document Tags and Contributors

Contributors to this page: smooth-progs
Last updated by: smooth-progs,