[wp-hackers] HTML Anchor Syntax

Brad Fults bfults at gmail.com
Tue Sep 27 05:15:22 GMT 2005


In a recent changeset (2906) [1], there are anchors that are being
created on the admin post page. The HTML uses the following syntax:

<a id="preview-post"></a>

I am wondering why this specific syntax is being used instead of
simply adding the same id to the h2 element itself, like so:

<h2 id="preview-post"><?php _e('Post Preview (updated when post is
saved)'); ?> ...

As far as I know, using the A element for anchoring is a thing of the
past, and even then it was <a name="..."> (an empty element without
the closing </a>).

Clarification on this usage would be appreciated and I think it would
be good to establish a product-wide standard for anchor syntax (if one
doesn't already exist).

Thanks.

[1] - http://trac.wordpress.org/changeset/2906

--
Brad Fults
NeatBox


More information about the wp-hackers mailing list