Thiemo Mättig

Thiemo’s Weblog

There are still some <img border="1"> in the photo section of my website, an HTML attribute that is deprecated since 17 years, I believe. To lazy to fix it I found a really nice way to make it feel like it's part of an up to date web standard: By adding something like img[border="1"] { border: 2px dashed red; } to my CSS I can turn it into a custom boolean attribute that enables whatever image border I want. Neat. Not entirely valid HTML 5, because the standard requires custom attributes to start with data-…, but works.

Kommentare zu diesem Beitrag können per E-Mail an den Autor gesandt werden.

[ < Zurück zur Übersicht ]

Impressum & Datenschutz