[html5] page element?
designer
designer at gwelanmor-internet.co.uk
Fri Mar 19 04:16:12 PDT 2010
Hi Chris & all,
>Or is it an overall wrapping element around all "visible" parts of the page
Yes. It does the same as <div id="wrapper">, and in the same way.
So why have it at all? - well, in html5 we have <nav> now, which (nomatter
how you dress it up and make it sound like a big step forward) is the same
as <div id="nav"> (or it can be). What the use of <nav> does is:
1. It makes for consistency of code. Everyone uses <nav>, whereas
previously, we used 'nav' , 'menu', 'links' etc. etc., somewhat
indiscriminately.
2. It encourages the usage to be semantic and it's easier to set up 'rules'
or guidelines.
<footer> vs. <div id="footer"> is a similar case.
<page> vs. <div id="wrapper"> is another. [:-)]
As to Mike's multiple pages, this can be very handy for documents which are
collections of related but separate content. We can also 'paginate' and
link by using
<a href="#x"> and I've no doubt other things will come with usage.
HTML5, as far as I can see, provides 3 distinct areas of improvement:
1. New elements which enable us to do things we couldn't do before -
<canvas> being the obvious example.
2. New elements which don't make it possible to do 'new' things, but make
the doing of those things more structured, organised and semantic. <figure>
and <figcaption> are an example. We've all been doing that for years:
<div class="figure">
<img href="etc.
<p>title</p>
</div>
cf:
<figure>
<img href="etc.
<figcaption>title</figcaption>
</figure>
In my view of the world, <page> would be another one of those examples:
<div id="wrapper">
bla bla
</div>
cf:
<page>
bla bla
</page>
N.B. You don't HAVE to use <page>. If you don't have a need to use <div
id="wrapper">, you CAN use <body>. However there are a VERY large number of
us (wish I had figures!) who prefer to wrap their visible content in a box,
and it is for these people that <page> would be good.
Bob
----- Original Message -----
From: "Chris Taylor" <Chris.Taylor at figureout.com>
To: "'designer'" <designer at gwelanmor-internet.co.uk>
Cc: <help at lists.whatwg.org>
Sent: Friday, March 19, 2010 9:41 AM
Subject: RE: [html5] page element?
Hi Bob,
Can I clarify what you're suggesting, please? By <page> do you mean a
wrapping element for content which isn't inside one of the other wrapping
elements introduced by HTML5? For example:
<html>
<body>
<header>
Page title, navigation etc
</header>
<nav>
Navigation
</nav>
<page>
** the actual content of the page **
</page>
<sidebar>
Additional navigation (tag cloud, categories) etc
</sidebar>
<footer>
Copyright, link to sitemap etc
</footer>
</body>
</html>
Or is it an overall wrapping element around all "visible" parts of the page.
<html>
<body>
<page>
<header>
Page titleetc
</header>
<nav>
Navigation
</nav>
<article>
** the actual content of the page **
</article>
<sidebar>
Additional navigation (tag cloud, categories) etc
</sidebar>
<footer>
Copyright, link to sitemap etc
</footer>
</page>
</body>
</html>
If the former then I suggest the use of <article> (or even a new element of
<content>, which may encompass one or more <articles>s).
If the latter then I agree with the general consensus that <body> is the
overall wrapping element, and for styling a <div id="wrapper"> is best.
Generally I use <div id="wrapper"> for setting width of the viewable area in
a centred layout, so I don't see how a semantic element will help in that
case.
Chris
> -----Original Message-----
> From: help-bounces at lists.whatwg.org [mailto:help-
> bounces at lists.whatwg.org] On Behalf Of Alastair Campbell
> Sent: 19 March 2010 09:12
> To: Mike Schinkel
> Cc: help at lists.whatwg.org
> Subject: Re: [html5] page element?
>
> On Fri, Mar 19, 2010 at 12:59:02AM -0400, Mike Schinkel wrote:
> > > It would be used for the visible portions of a page (vs. the non-
> visible
> > > portions that are contained in the body like <script> tags and the
> CSS
> > > visibility:hidden and display:none.
> > >
> > > If they are hidden, does it matter if they are in the body/page?
> >
> > Yes. Example: (a multi-page wizard that uses Javascript to move from
> page
> > to page):
>
> If I were implementing that, I'd look at either having a multipage
> wizard in the traditional sense, or an AJAX version that replaces the
> main content of the page. If the latter, it would probably be the
> central content area that's replaced, not the 'page'.
>
> > > > A screen reader would read what's inside this <page> element and
> typically
> > > > ignore what's outside.
> > >
> > > As they do for body.
> >
> > Are you making a counterpoint?
>
> Yes: body and page are interchangable in this case, therefore page is
> not needed.
>
> You'd said that the things not visible were the scripts and things
> hidden with display: none. Screen readers ignore those things as well.
>
> Kind regards,
>
> -Alastair
> _______________________________________________
> Help mailing list
> Help at lists.whatwg.org
> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
This message has been scanned for malware by SurfControl plc.
www.surfcontrol.com
More information about the Help
mailing list