Preloading Your Zombie Smashing Weapons

You can preload custom fonts using in your head. This allows the browser to schedule the download of the font even before it finds the font in the CSS @font-face rule. It’s kind of like letting the quartermaster know about a particular need or requirement before he finds where it’s listed. He can send an... Read More

Semantically Stopping the Apocalypse

Semantic code helps ensure consistent browser rendering because the browser has to make fewer decisions (read guesses) about what you intended. It knows how semantic code should be displayed. It does not know how some non-semantic gobbledygook somebody handed it is supposed to be displayed and so it guesses. Different browsers will make different guesses... Read More

Lazy Loading (the Undead)

loading=“lazy” is an attribute for images that allows it to be loaded later unless it’s needed i.e. when it’s visible in the viewport. In this way you can hold off downloading images further down the page (like setting the zombies to come in one-by-one vs all at once). This prevents those images from delaying the... Read More

Boolean Attributes

Some HTML attributes, like most apocalyptic politicians, do not require values. These are usually boolean (true or false) in nature, and so adding the attribute constitutes true. For example, in the video element, if you want to include play/pause/stop controls, you can use the controls attribute... Read More

Two Kinds of Web Components

There are two kinds of web components: autonomous (name your own element) and customized built in elements (supercharge an existing element). Note: Safari does not support customized built in elements, but all other browsers do. Custom elements require a dash in their name and some JavaScript. Custom built in elements need the is attribute and... Read More

The ol and ul Type Attribute

On ol/ul elements the type attribute let’s you change what type of numbering/bullets used. With ol set the type to “i” for lowercase Roman numerals or “I” for uppercase ones. “A” sets capital letters while “a” uses lowercase ones. On ul change the type with disc (default), circle or square. You can also use the start attribute to start... Read More

The Current HTML Standard

HTML5 was a major release for the HTML language. It was initially released in October 2014. It brought a wide variety of new functionality and smoother syntax to HTML. HTML4, the previous major standard, was released in April of 1998 and had only minor revisions during those 16 years. The current release is the HTML Living... Read More

Block and Inline Elements

A block level element should not go inside an inline level/phrase element. There are exceptions, but generally a block level element can contain either block or inline elements, but an inline element can only hold other inline elements. The major exception is the a tag, that, since HTML5, is an inline element that is allowed... Read More