SHARE
Facebook X Pinterest WhatsApp

Using the CSS “any” Selector, Developers Go Simple

Apr 7, 2011

While the new tags introduced by HTML5 are very useful for enabling the use of new features, including tags for sections, articles, asides, headers and footers, they can also make a developer’s work more difficult to style using CSS. By using the CSS “any” selector, a developer’s life can once again be easier. 

The -any() pseudo selector, which was proposed by Mozilla, makes life easier and makes CSS code much easier to read. It groups all of your top level tags together, and moves on to do the same with the next level of tags, and then moves on to H1 tags. 

The only limitation to using the any selector is that currently it is only supported by Firefox 4 and WebKit-based browsers. Hopefully it’s only a temporary limitation, as it was only introduced a year ago, and three browsers already support it. 

Recommended for you...

Web 3.0 and the Future Of Web Development
Rob Gravelle
Jun 23, 2022
CodeGuru and VBForums Developer Forums and Community
James Payne
Apr 7, 2022
Understanding CSS Template Layout
Vipul Patel
Mar 29, 2022
Criminals Pay More for Code Signing Certificates Than for Guns or Passports
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.