Source code
Revision control
Copy as Markdown
Other Tools
<html>
<head>
<title>CSS Test: xml:lang attribute selector in HTML</title>
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<meta name="flags" content="HTMLonly">
<meta name="assert" content="xml:lang in HTML cannot be selected by [lang] selectors.">
<style type="text/css">
[lang] { background: red; color: yellow; }
[lang="ch"] { background: red; color: yellow; }
[lang|="ch"] { background: red; color: yellow; }
[lang~="ch"] { background: red; color: yellow; }
[xml:lang] { background: red; color: yellow; }
[xml:lang|="ch"] { background: red; color: yellow; }
</style>
</head>
<body>
<p xml:lang="ch">There must be no red.</p>
</body>
</html>