'[hidden]' selectors in css

css, html

Solution

`[attribute]` is a selector for elements that have an attribute `attribute`.

`[hidden]` matches elements like this `<p hidden>Hidden paragraph</p>`.

The value doesn't matter, as long as the attribute exists. `[lang]` matches elements like this for example `<p lang="pt-br">Paragráfo</p>`.

P.S.: `[attribute=value]` also works. e.g. `[headers="numberHeader"]` for matching `<td headers="numberHeaders">...</td>`

Problem

When we view normalize.css http://necolas.github.io/normalize.css/ source code, we can see the following: ``` [hidden], template { display: none; } ``` What is the meaning of [hidden] ?

Original source