html header and html body

This is a discussion on html header and html body within the Tech Board forums, part of the Community Boards category; But how does standard say whether content not wrapped in header and also not wrapped in body belongs to header ...

  1. #16
    Registered User
    Join Date
    Aug 2008
    Posts
    27

    Talking

    But how does standard say whether content not wrapped in header and also not wrapped in body belongs to header or body?

    Quote Originally Posted by jwenting View Post
    You do realise that http and html are two completely different things?
    The http RFCs don't deal with html, nor do the html specifications deal with network transport protocols.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Checker1977 View Post
    But how does standard say whether content not wrapped in header and also not wrapped in body belongs to header or body?
    I thought cornedbee already answered that: Unless it is SGML, it will be treated like it had a body around it.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #18
    Registered User
    Join Date
    Aug 2008
    Posts
    27
    The problem is I did not find from which paragraph of the Html Spec 5, the conclusion "it will be treated like it had a body around it" is reached. Any ideas?

    Quote Originally Posted by matsp View Post
    I thought cornedbee already answered that: Unless it is SGML, it will be treated like it had a body around it.

    --
    Mats

  4. #19
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I quoted the HTML 4 spec. It says that for all of html, head and body, both the start and the end tags are optional. So the elements exist whether the tags are there or not, and all that's left is to correctly sort the subelements into head and body.

    For the HTML 5 spec, look at 8.1.2.4 for when it's allowable to omit the start tags of html, head and body.
    For parsing, look at 8.2.3.1 and 8.2.5.5 and following. Note that the note in 8.2.5.6 is incorrect.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. html encoding issue
    By Checker1977 in forum Tech Board
    Replies: 8
    Last Post: 12-18-2008, 04:18 PM
  2. kickn' html generator
    By jverkoey in forum C++ Programming
    Replies: 0
    Last Post: 03-12-2003, 08:03 PM
  3. Html anchor tag question.
    By adrianxw in forum Tech Board
    Replies: 1
    Last Post: 03-07-2003, 05:52 AM
  4. IDEA: HTML Escaper
    By ygfperson in forum Contests Board
    Replies: 0
    Last Post: 08-12-2002, 11:29 PM
  5. Using fstream to edit a html file
    By mimoman in forum Game Programming
    Replies: 1
    Last Post: 02-21-2002, 10:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21