Mathias Bynens 7/11/2010

The `id` attribute got more `class`y in HTML5

Read Original

The article details a key change in HTML5 where the `id` attribute's naming rules are relaxed to match those of the `class` attribute. It explains the specific character restrictions in HTML 4.01 versus the more permissive rules in HTML5, allowing IDs to contain symbols, emojis, and even complex strings. It also touches on the practical implications for CSS and JavaScript when targeting these unconventional IDs.

The `id` attribute got more `class`y in HTML5

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week