Thread: html header and html body

  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,895
    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

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, 05:18 PM
  2. kickn' html generator
    By jverkoey in forum C++ Programming
    Replies: 0
    Last Post: 03-12-2003, 09:03 PM
  3. Html anchor tag question.
    By adrianxw in forum Tech Board
    Replies: 1
    Last Post: 03-07-2003, 06: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, 11:46 AM