Thiemos Archiv
- Monday, 2016-12-12 23:43
- 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 likeimg[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 withdata-…
, but works. Kommentare zu diesem Beitrag können per E-Mail an den Autor gesandt werden.