W3C home > Mailing lists > Public > public-xhtml2@w3.org > June 2008

Re: block level anchor element content

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Tue, 3 Jun 2008 01:34:15 +0100
Message-ID: <ed77aa9f0806021734yec27a4br15124d565cfa012d@mail.gmail.com>
To: "Kevin McManus" <k.mcmanus@gre.ac.uk>
Cc: public-xhtml2@w3.org

Hi Kevin,

On Fri, May 30, 2008 at 9:06 PM, Kevin McManus <k.mcmanus@gre.ac.uk> wrote:
>
> I am not entirely sure if this is the appropriate list but...
>
> I feel that it would help accessibilty if anchor elements could
> contain block level elements.
>
> An example can be seen at the URL below.
>
> Having a div as the anchor content is supported by the main
> browsers and greatly increases the target size while maintaining
> keyboard support.

But 'block level' is about the document structure, and *not* about CSS
formatting. You can style an <a> or an <img> to be "display: block;"
to get the effect in your page, but that is very different to the
notions of 'block' and 'inline' which we use when describing elements
in the HTML and XHTML languages.

The way to look at it is that a document is first (at the top level)
divided into 'blocks', like paragraphs and sections. If you want a
block with no semantic meaning (i.e., not a paragraph of text, and not
a section) then you can use a div.

Inside these blocks is text, and the text can contain 'inline'
mark-up. An example of inline mark-up would be emphasis, superscript,
subscript...that kind of thing. Images can be inline, and of course
any text could have an anchor tag around it. If you want an inline
element with no semantics then use a span.

So as you can see, 'inline' elements don't have to be "display:
inline;" and 'block-level' elements don't have to be "display:
block;"; inline elements are essentially those that don't give the
document any structure, but could appear in a 'flow' of text.

And allowing <a> to contain a <div> would break this whole structure.

Regards,

Mark

-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)
Received on Tuesday, 3 June 2008 00:34:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 February 2010 18:12:49 GMT