- From: Steve Faulkner <faulkner.steve@gmail.com>
- Date: Sat, 1 Feb 2014 19:20:04 +0000
- To: www-style@w3.org
- Message-ID: <CA+ri+VnBOJ9Vb9Bt8TiyughoMKJssb2UtLEHeUaC_Ja9j2yjDA@mail.gmail.com>
> > Hi Leif, > > You wrote: > > > This might well have been thought of already. But when designing/ > > styling some HTML documents as a book, I found myself repeatedly > > adding div elements of the following kind: > > > > <section> > > <h1> Headding</h1> > > <div class="body-text"> > > <p>Lorem > > <p>Ipsum > > <p>Dolor > > <p>Sint > > </div> > > </section> > > I think you're looking for <main>: > > > The main element can be used as a container for the dominant contents > > of another element. It represents its children. > > See http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-main-element > > > Ted > > P.S. Yes, I realize the W3C version of the spec forbids <main> from > appearing more than once on a page. There's an open bug on this. > > there's a closed bug on it :-). This thread is about styling and its fine to use <div> in this circumstance, unlike the main element which represents the main content of the document, not bits in sections. So what you suggest is non conforming as its an abuse of the semantics. http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-main-element if not using an element but being able to style content other than the heading, is the desired outcome section :not(h1) { } would work to select content in a section that is not the heading. -- Regards SteveF HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
Received on Saturday, 1 February 2014 19:21:11 UTC