Sent by Noel Taylor on 1 July 2009 15:03
Tim, that's a great answer and it's good to be reminded that the point of
HTML
is to describe a document to a computer. One more question, though, if you
don't mind: What is the difference then, philosophically I guess, between a
span and a div, since their default block/inline stylings do not determine
their
fundamental nature?
A "div" is a division of course, and a span is, well, a span, but I'm not
sure I
see a basic difference between them unless it is that a span is understood
to
be smaller than a division, like a sub-division. Is that your
understanding?
On Tue, Jun 30, 2009 at 3:27 PM, Climis, Tim [EMAIL-REMOVED]> wrote:
> From: Noel Taylor [EMAIL-REMOVED]]
> Sent: Tuesday, June 30, 2009 3:53 PM
> To: Climis, Tim
> Cc: [EMAIL-REMOVED]
> Subject: Re: [css-d] progress bar
>
> Tim, thank you for your response. I'm now very curious to know your
> thoughts
> on the following:
>
> > 1. Is there in fact a rule/convention that you shouldn't put <a> tags
> around block-
> > level elements, or have I been misinformed?
>
> There is such a rule. It's actually more general than that. You can't put
> block-level elements inside of in-line elements. So no divs inside spans.
> No paragraphs inside bold tags. Etc.
>
> It's because HTML is a language for structuring documents. So the point is
> to structure the document so that it makes sense. It doesn't display
> anything, necessarily. If it's structured according to the rules, then it's
> easier to step through it in programming languages, and easier for text
> browsers and screen readers to know how to read it.
>
> If you used a heading tag every time you want bold text, whether it's a
> heading or not, then when programs are browsing through it, they don't know
> that what they're looking at isn't a heading. They'll treat it like one.
>
> > 2. If there is such a rule, is putting <a> tags around spans with
> {display: block}
> > any better than using divs? Isn't the fact that divs are block-level and
> spans are
> > inline the main difference between spans and divs? Am I not just making
> one
> > into the other by changing this property?
>
> Making something look like a block element does not make it a block
> element. That's the main difference. If I look up in the sky, and I see a
> cloud that looks like a pig, it doesn't mean that the cloud is really a pig.
> Just because a span looks like a div, doesn't mean it's really a div.
>
> How it looks to you (or anything else with eyes) isn't the point of HMTL.
> The point is to be able to describe a document to a stupid computer.
>
> ---Tim
>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/