Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Nested <a> tags are a bit unusual, too, even if they are legal (is this valid? I don’t even know, because come on!)"

As it happens I've been fiddling with the HTML 4.01 DTDs in a project the past couple of weeks, and I can answer this for at least HTML 4.01: No. An A element may contain any inline element except for another A tag, which is explicitly denied.

(It isn't entirely clear to me whether the standard permits something like <a><b><a> or if the exclusions apply to all children, but the latter interpretation makes more sense.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: