Simon Willison’s Weblog

Subscribe
Atom feed for html

72 items tagged “html”

2010

If HTML is just another bytecode container and rendering runtime, we’ll have lost part of what made the web special, and I’m afraid HTML will lose to other formats by willingly giving up its differentiators and playing on their turf.

Alex Russell

# 17th March 2010, 10:37 pm / html, viewsource, javascript, alex-russell

2009

Every time you attempt to parse HTML with regular expressions, the unholy child weeps the blood of virgins, and Russian hackers pwn your webapp. Parsing HTML with regex summons tainted souls into the realm of the living. HTML and regex go together like love, marriage, and ritual infanticide.

Andrew Clover

# 16th November 2009, 10:32 am / funny, html, parsing, regex, regular-expressions, stackoverflow, xhtml, andrew-clover

HTML has always been a conversation between browser makers, authors, standards wonks, and other people who just showed up and liked to talk about angle brackets. Most of the successful versions of HTML have been “retro-specs,” catching up to the world while simultaneously trying to nudge it in the right direction. Anyone who tells you that HTML should be kept “pure” (presumably by ignoring browser makers, or ignoring authors, or both) is simply misinformed. HTML has never been pure, and all attempts to purify it have been spectacular failures, matched only by the attempts to replace it.

Mark Pilgrim

# 3rd November 2009, 7:20 am / html, html5, standards, mark-pilgrim

Django ponies: Proposals for Django 1.2

I’ve decided to step up my involvement in Django development in the run-up to Django 1.2, so I’m currently going through several years worth of accumulated pony requests figuring out which ones are worth advocating for. I’m also ensuring I have the code to back them up—my innocent AutoEscaping proposal a few years ago resulted in an enormous amount of work by Malcolm and I don’t think he’d appreciate a repeat performance.

[... 1,674 words]

Video for Everybody! Reminiscent of the early days of Web Standards, Kroc Camen has created a fiendishly clever chunk of HTML which can play a video on any browser, starting with HTML5 video then falling back on Flash and eventually just an HTML message telling the user where they can download the file. No JavaScript to be seen, but conditional comments abound. Requires you to encode as both Ogg and H.264, but Kroc includes details instructions for doing that using Handbrake.

# 2nd July 2009, 7:33 pm / html5, video, kroccamen, html, hacks, encoding, codecs, handbrake, ogg, h264

Reducing XSS by way of Automatic Context-Aware Escaping in Template Systems (via) The Google Online Security Blog reminds us that simply HTML-escaping everything isn’t enough—the type of escaping needed depends on the current markup context, for example variables inside JavaScript blocks should be escaped differently. Google’s open source Ctemplate library uses an HTML parser to keep track of the current context and apply the correct escaping function automatically.

# 14th April 2009, 9:26 am / html, google, ctemplate, django, escaping, open-source, security, xss

FireScope. Neat little Firefox / Firebug extension which adds a “Reference” tab showing documentation for the selected element from the comprehensive SitePoint Reference site.

# 5th February 2009, 10:51 pm / sitepoint, firefox, firebug, firescope, extensions, documentation, reference, css, html

2008

Using SVG on the Web. I’ve been having a lot of fun playing with SVG recently. Here are some useful tips for including SVG images in HTML and XHTML documents.

# 23rd December 2008, 1 pm / svg, html, xhtml, benjamin-smedberg

YQL—converting the web to JSON with mock SQL. YQL just got a whole lot more interesting to me—I had no idea they were exposing an HTML and RSS scraping tool over a JSONP API in addition to all of the Yahoo! web service methods.

# 13th December 2008, 9:39 am / yql, scraping, json, yahoo, html, screenscraping, jsonp, sql

Conditional classnames. Yahoo!’s internal coding standards still recommend CSS hacks over conditional comments because a separate stylesheet for IE imposes an additional HTTP request. Paul Hammond points out that you can use conditional comments to write out an extra class=“ie” attribute on the body element and use that to target the IE specific fixes in your stylesheets.

# 17th October 2008, 1:32 pm / conditionalcomments, classes, css, paul-hammond, yahoo, html

XHTML—myths and reality. Useful overview of XHTML from Tina Holmboe of the W3C’s XHTML Working Group, which suggests considering HTML 4.01 strict unless you need mixed namespaces for things like MathML. I’ve been storing this blog’s content as XHTML but serving as HTML for several years now.

# 7th October 2008, 4:56 pm / mathml, xhtml, tinaholmboe, w3c, namespaces, html

django-html. A small project I’m working on to make Django behave better with regards to HTML v.s. XHTML.

# 9th September 2008, 11:59 pm / projects, djangohtml, django, html, python, xhtml

Coding Horror: Protecting Your Cookies: HttpOnly. Jeff Atwood discovers the hard way that writing an HTML sanitizer is significantly harder than you would think. HttpOnly cookies aren’t the solution though: they’re potentially useful as part of a defense in depth strategy, but fundamentally if you have an XSS hole you’re going to get 0wned, HttpOnly cookies or not. Auto-escape everything on output and be extremely cautious with things like HTML sanitizers.

# 29th August 2008, 2:01 am / html, sanitization, jeff-atwood, security, httponly, xss, javascript

Javascript protocol fuzz results. If your HTML sanitizer uses blacklisting rather than whitelisting here are a few more weird ways of injecting javascript: in to a link that you need to worry about—but you should really switch to whitelisting http:// and https:// instead.

# 30th June 2008, 3:57 pm / sanitization, html, blacklisting, whitelisting, javascript, fuzztesting, firefox, security

James Bennett: Why HTML. Finally, somewhere to point people when they ask why I avoid XHTML that’s a bit more up to date than Hixie’s rant from 2002.

# 18th June 2008, 12:27 pm / xhtml, james-bennett, html, ian-hickson, hixie, web-standards

Elliotte Rusty Harold: Why XHTML. “XHTML makes life harder for document authors in exchange for making life easier for document consumers.”—since there are a lot more document authors than there are tools for consuming, this seems like an argument AGAINST XHTML to me.

# 5th June 2008, 9:25 pm / elliotte-rusty-harold, xhtml, html, html5, web-standards

Embedding custom non-visible data in HTML 5. “Every HTML element may have any number of attributes starting with the string ’data-’ specified, with any value.”—this will be incredibly useful for unobtrusive JavaScript where there’s no sensible place to store configuration data as HTML content. It will also mean Dojo has an approved method for adding custom attributes to declaratively instantiate Dojo widgets.

# 19th April 2008, 10:58 pm / html5, javascript, standards, unobtrusive-javascript, html, dojo, customattributes

hash. Douglas Crockford: “Any HTML tag that accepts a src= or href= attribute should also be allowed to take a hash= attribute”—to protect against file tampering and (more importantly) provide a truly robust caching mechanism.

# 30th March 2008, 6:34 pm / hash, sha1, douglas-crockford, html, caching

2007

I don't even use Firefox and Firebug anymore, the revised Web Inspector in Leopard has been incorporated in Coda and that does everything I need and more.

Jon Hicks

# 20th December 2007, 3:09 pm / firebug, firefox, html, jon-hicks, leopard, software, debugging, css, coda, webinspector

SVG and text/html. Anne van Kesteren discusses the need for SVG and MathML to be embeddable in HTML 5, not just XHTML.

# 17th October 2007, 4:06 pm / html, html5, svg, annevankesteren, xhtml, mathml

The longdesc lottery. Mark Pilgrim is now writing for the WHATWG blog. Here he makes the case for replacing the longdesc attribute with a better solution, based on ten years of developer ignorance and misuse. As always with that site, check the comments for a microcosm of the larger debate.

# 14th September 2007, 11:44 am / mark-pilgrim, accessibility, longdesc, whatwg, html5, html

html4all. New mailing list / advocacy group focusing on accessibility issues relevant to HTML 5. This is something that the core HTML 5 group have taken a lot of criticism for, although it’s unfair to say that they don’t care about accessibility (they are however challenging a lot of sacred cows).

# 14th September 2007, 11:35 am / html4all, whatwg, html5, html, accessibility

Restructured Text to Anything. Slick set of online tools for converting Restructured Text (one of the more mature wiki-style markup languages) to HTML or PDF. Includes a nice looking API. Powered by Django.

# 13th September 2007, 3:54 pm / django, restructuredtext, python, html, pdf

jQuery 1.2. Lots of neat new stuff; my favourite new feature is “Partial .load()” which lets you pull in HTML with Ajax and then use a CSS selector to grab a subset of that page and inject it in to the DOM.

# 11th September 2007, 8:44 am / jquery, html, css, javascript, selectors

Why the Alt Attribute May Be Omitted. “The benefit of requiring the alt attribute to be omitted, rather than simply requiring the empty value, is that it makes a clear distinction between an image that has no alternate text (such as an iconic or graphical representation of the surrounding text) and an image that is a critical part of the content, but for which not alt text is available.”

# 25th August 2007, 1:11 pm / accessibility, html, html5, whatwg, alt-attribute

I've been in this web standards game for five years now and probably have over 100 standards-based sites under my belt. I can count the number of times I've be involved in a redesign where no changes were made to the markup on one finger.

Jeff Croft

# 11th August 2007, 9:37 am / markup, html, css, jeff-croft

WebCore Rendering I—The Basics. Dave Hyatt has started a series of posts explaining the internals of WebCore’s rendering system.

# 10th August 2007, 3:21 pm / dave-hyatt, safari, webcore, internals, browsers, html, css

The CSS Redundancy Checker. A tool for checking your markup for outdated CSS rules that don’t match any of your HTML. We were discussing the need for something similar to this at Torchbox a few weeks ago.

# 6th July 2007, 12:02 pm / html, hpricot, css, ruby, tom-armitage, tools

HTML Entity Character Lookup. Look up HTML entities by characters that are a similar shape.

# 3rd July 2007, 3:41 pm / html, unicode, tool