Vernacular

HTML Made Special

Reinventing the Wheel

HTML comes with quite a fair bit built-in. If you add the rest of the platform that exists around it, you have a lot at your fingertips. If you’re using RDFa/Microdata, the same can be said of large common vocabularies like schema.org.

At times, though, you might feel that what’s built-in does not match your needs exactly enough and that you’d be better off building your own variant. There are cases in which that is true — otherwise we would never need new elements — but this urge should be resisted long and hard.

It is easy to forget that HTML’s constructs tend to carry a lot more than what you have immediately in mind when you use them. In fact, that’s why you’re building a vernacular in the first place. To boot, they have built-in semantics. This means that they work with search engines, not to mention that they are accessible. Your reinvention of h1 or of button will have none of that. They are also properly internationalised: have you taken the time to think about how your feature works in other languages?

It may be that schema.org fails to convey some distinction that is crucial to you. That is both fine and expected. In that case, simply extend it by defining your own missing property rather than trying to replace all of the parts that you could actually use. The shared understanding that many other consumers of your data have of a well-known vocabulary will often prove far more useful than a gain in concision. There really is no point in being more precise if no one understands the precision at hand.

↖︎ Back to list