Seriously, how did I never know about this until today?
An invisible, “soft” hyphen. This character is not rendered visibly; instead, it suggests a place where the browser might choose to break the word if necessary. In HTML, you can use
­to insert a soft hyphen.
The easier it is to fill out forms automatically, the more likely you are to get users to submit them. But nobody likes filling out forms, and autocomplete is getting smarter and smarter — but in my experience, it’s rarely perfect. So it’s nice to know that the HTML standard has added an
autocomplete attribute to form fields that makes it easier for browsers to guess what data goes where.
Google has announced that Chrome now fully supports this spec, and there’s another page for developers that talks about how to make forms friendlier.
Often, our site designer wants a web page footer that’s glued to the bottom of the page. I don’t mean
position:fixed — it needs to be something that appears at the very bottom of the HTML document, whether the page scrolls or not.
So this how I do it. The technique uses a combination of
height: 100% and absolute positioning of the footer. Here’s how it works: Continue reading Semi-sticky page footer
In the spirit of completeness, here’s a second popular (at least for me) way to use definition lists: to create a simple two-column table.
This approach has some advantages over using actual HTML tables. One is that you don’t need to make sure you close your table rows, because there aren’t any. Another is that it’s more responsive, since you can use media queries to let the definition list revert to its usual styling for narrow screens. Continue reading Two-column definition lists
I’m a big fan of semantic HTML. When content describes a list of things, a developer should use a
<ul>. Even if you don’t want it to be a bulleted list, or maybe want the elements to all be on a single line, use the appropriate semantic tags — search engines and screen readers will appreciate the improved readability.
So what if you don’t want a list to look like a list? CSS has long since progressed to the point where it’s possible to display HTML elements any way we like. Continue reading Inline defintion lists