Ryan
Ryan

Reputation: 6045

Besides the doctype and the html tag, what other markup can be outside the html head and body?

With an HTML document almost everything is inside the html head and body. What are all the things that can be outside of the html head and body?

Upvotes: 0

Views: 129

Answers (3)

MikeM
MikeM

Reputation: 27405

HTML 4.01 Spec specifies these three parts an HTML document is comprised of:

  • a line containing HTML version information,
  • a declarative header section (delimited by the HEAD element),
  • a body, which contains the document's actual content. The body may be implemented by the BODY element or the FRAMESET element.

HTML 5 Editor Spec specifies html as the root element with

A head element followed by a body element.

and frameset is included in the Obsolete feature list

Upvotes: 2

Šime Vidas
Šime Vidas

Reputation: 185883

Only comments and space characters.

Documents must consist of the following parts, in the given order:

  1. Optionally, a single U+FEFF BYTE ORDER MARK (BOM) character.
  2. Any number of comments and space characters.
  3. A DOCTYPE.
  4. Any number of comments and space characters.
  5. The root element, in the form of an html element.
  6. Any number of comments and space characters.

Source: http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#writing

Upvotes: 1

Emil
Emil

Reputation: 8527

That should be it. You have html as parent, and head and body as children.

Upvotes: 0

Related Questions