5 ms·
Nice proof of concept. It'd be more impressive with more sensible markup. The <b/> and <i/> tags are deprecated, and have always been intended to define the dis
by languagehacker 15y ago
Nice proof of concept. It'd be more impressive with more sensible markup. The <b/> and <i/> tags are deprecated, and have always been intended to define the display of their innertext -- not much more. This requires the tags with or without any actual text inside them to function. Without them, it's just a box. With text within them, it looks terrible.
I've dealt with designers who do this before -- implement HTML and CSS approaches that are not quite ready for the big leagues, to the absolute detriment of sensible markup within a real web application, or even a simple website. It's not just a problem for implementation (since you often have to unnecessarily decorate the data you're displaying), but it's a problem in terms of intelligently applying semantic markup to improve the machine-readability of what's being displayed on your site.
It's important to keep in mind that effectively implemented markup is leveraged not only by search engines, but by individuals with disabilities. You should always aim for informative, compliant, and forward-thinking markup before bending basic rules to make something look nice.
- alanh 15y agoThere is no problem with empty <b> and <i> tags which, by the way, are NO LONGER DEPRECATED in HTML5. (Learn the standards before becoming a standards Nazi.) And anyway, guess what? This was, as you say, a proof of concept. It would work with different elements, or even pseudo-clases (and pseudo-classes in pseudo-classes), though then IE compatibility would be lost. Anyone who copy/pastes this without changing the CSS selectors (styling all <b> tags as if they were triangles) clearly misses the point, you know?