special casing the "a" tag here is a bit klunky. The idea is to use subclassing, rather than special casing to get special behaviour.

So you create an "A" class, and have its render() method do "the right thing" for the href tag. See if you can re-factor it that way.