Comments on: Your Questions #15 https://stevefaulkner.github.io/html5doctored/your-questions-15/ helping you implement HTML5 today Wed, 29 Jun 2016 01:58:29 +0000 hourly 1 By: Chris https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13948 Wed, 19 Jan 2011 13:59:30 +0000 http://html5doctor.com/?p=2744#comment-13948 Valid point, Bruce. Didn’t think of that.

]]>
By: Bruce Lawson https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13947 Wed, 19 Jan 2011 13:56:57 +0000 http://html5doctor.com/?p=2744#comment-13947 But, Chris,if you don’t use <pre>, relying on CSS alone, the whitespace isn’t preserved if you view the page in a no-CSS browser (or one that doesn’t understand that rule).

And that’s bad, because whitespace has meaning, eg in code or poetry or ASCII art.

]]>
By: Chris https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13894 Mon, 17 Jan 2011 10:27:41 +0000 http://html5doctor.com/?p=2744#comment-13894 I don’t like using <pre> for code blocks. It’s just a presentational element and has no semantic meaning. It’s like using <tt> for fixed fonts. It should be a <code> with css formatting.

]]>
By: Niels Matthijs https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13892 Mon, 17 Jan 2011 08:10:58 +0000 http://html5doctor.com/?p=2744#comment-13892 Maybe it’s time to simply drop nesting restrictions. I don’t see where they could come in handy, and most of the time they simply prove too restrictive making them counter-productive. There isn’t any sane reason why a heading in an hgroup tag couldn’t be linked.The block level link is only a 50% solution as you can’t choose what heading to link (or provide separate links for each heading).

Are there any cases where restrictive nesting of html elements is useful?

]]>
By: Lars Gunther https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13867 Sun, 16 Jan 2011 12:09:52 +0000 http://html5doctor.com/?p=2744#comment-13867 Just a quick note about hgroup. There is still much discussion about the element on the HTML5 WG mailing list. It might be changed, removed or substituted. It’s a bit early to us it for anything but experiments.

]]>
By: Nick Fitzsimons https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13809 Fri, 14 Jan 2011 20:45:53 +0000 http://html5doctor.com/?p=2744#comment-13809 The spec is clear about the nature of the <pre> element and the fact that it isn’t inherently related to <code> (and its relatives) which convey additional semantics:

The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements.

…

To represent a block of computer code, the pre element can be used with a code element; to represent a block of computer output the pre element can be used with a samp element. Similarly, the kbd element can be used within a pre element to indicate text that the user is to enter.

For an appropriate use of <pre> that is completely unrelated to computer-related code, consider a poem where the poet has chosen to indent every second line by one space, and every third line by two spaces. The rules of HTML rendering dictate that such spaces should be collapsed into a single space, thereby destroying the effect the poet was seeking to create. Wrapping each line in a non-smeantic element and using CSS to create the indentation would not be appropriate, as the indentation is (in the rarefied mental plane that poets inhabit) not merely visual formatting, but an inherent part of the semantics of the work as a whole. I humbly suggest that only <pre> would do in such circumstances.

]]>
By: Jose Pedro https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13806 Fri, 14 Jan 2011 15:03:55 +0000 http://html5doctor.com/?p=2744#comment-13806 I always saw <pre> elements as block level equivalent of the <code> element. Isn’t

<pre> ... </pre>

enough for marking large code snippets? Even further having into account that all whitespace is properly parsed. The only reason I can see to use <code> inside <pre> is for marking up each line accordingly (with CSS).

]]>
By: Ian P https://stevefaulkner.github.io/html5doctored/your-questions-15/#comment-13805 Fri, 14 Jan 2011 15:02:13 +0000 http://html5doctor.com/?p=2744#comment-13805 Hi, helpful collection of questions and answers, thanks.

In the first example where you’re giving a details for an album: I’m still unsure if we should be using dl to define things by giving them values as opposed to defining what the things being defined actually mean.

I’m sorry if that make absolutely no sense at all. I’m struggling to think of a better way to ask this.

]]>