Posts Tagged ‘HTML’

hCard parser H2VX not ready for HTML5 yet

Saturday, January 14th, 2012

Updated January 16, 2012

New frontiers come with unexpected challenges. I like using the hCard microformat in websites to make it easy for people to add contact information to their address books. I also like building websites in HTML5 for the semantics and am confident it is the way forward. Tools like Modernizr make browser support less of an issue with the new tags.

What’s an hCard without a parser?

The hCard format is great for publishing contact info in HTML, but to turn it into a vCard that can be downloaded and added to your address book, something has to do the conversion for you. (more…)

Pitfalls of styling the HTML element

Wednesday, April 13th, 2011

This was fun painful.

On the new ablesense.com website design, I had foolishly applied some styles to the <html> element — specifically my font stack for the website. The particular selection of fonts was very important in making this mistake obscure:

html { font-family: helvetica, arial, sans-serif; }

Browsers have default fonts

The fonts all looked fine in Firefox, Safari, Chrome, and Internet Explorer (Helvetica on Mac, and Arial on PC). This lines up with the CSS rule above, so it seemed like everything was fine — but it was not. (more…)

Markup after the HTML tag

Friday, February 4th, 2011

From time to time when a web page renders strangely I’ll take a quick peak at the HTML source to see what kinds of extra scripts and remotely hosted resources are part of the page. The usual stuff (Google Analytics, Flickr Slideshows, Banner Ads, Facebook, Twitter, etc) never stands out to me, but today I saw something that made me take notice.

The snippet below is the last few lines of a page on a major newspaper’s website. Now, for the record, I’m only 99.9% certain that this markup is broken:

</body>
</html><img width='0' height='0' border='0' src='/counter?uid=123'/>

Maybe this kind of markup after the closing HTML tag is not an issue in any browser. Maybe. I would be interested to know if the placement of the “counter” image is on purpose or just a temporary quirk of the publishing system. I can’t think of any reason to not put a dimensionless tracking image inside the closing body tag — especially when it’s being requested from the same host as the document.

Please chime in with a comment if I’m missing something here.