Advanced Search

Results 1 to 3 of 3

Thread: In HTML5 <footer> tag of the whole page, have to be direct child of <body>

  1. #1
    Join Date
    Jan 2012
    Posts
    74
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default In HTML5 <footer> tag of the whole page, have to be direct child of <body>

    In HTML5 <footer> tag of the whole page, have to be direct child of <body>,... of can reside in a big div include all body contents?

  2. #2
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    As far as I can tell, the footer element does not have to be a direct child element of the head, after validating an example such as this:
    HTML Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>test</title>
    </head>
    <body>
    <header>
    <h1>test</h1>
    <p>test</p>
    </header>
    <article>
    <p>lorum</p>
    <p>ipsum</p>
    </article>
    <div>
    <footer>
     2012 me
    </footer>
    </div>
    </body>
    </html>
    it's prefectly valid. Also, after consulting numerous pieces of documentation, it appears to be perfectly fine to have it within a div.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,629
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Correct.

    Also, you are not limited to one <footer>.
    Individual sections, articles, etc. may have their own footer (and header as well).
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

Similar Threads

  1. Lyteframe: Check if page is loaded direct?
    By blackfive in forum JavaScript
    Replies: 2
    Last Post: 04-07-2011, 09:50 PM
  2. Replies: 2
    Last Post: 03-24-2009, 01:42 PM
  3. Resolved HTML direct Links within page
    By igotregistered in forum HTML
    Replies: 8
    Last Post: 03-12-2009, 05:42 PM
  4. Activating parent page link from 'child page'
    By pamcse in forum JavaScript
    Replies: 1
    Last Post: 06-07-2005, 01:53 PM
  5. Rollover buttons direct new page to wrong frame
    By larsnyberg in forum JavaScript
    Replies: 4
    Last Post: 11-17-2004, 05:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •