Reputation: 15889
If you want to build a page with no "fancy" header and go plain like this:
<body><h1>title</h1>content</body>
Is it Ok?
Upvotes: 1
Views: 900
Reputation: 5136
From the HTML5 specification:
Documents must consist of the following parts, in the given order:
- Optionally, a single "BOM" (U+FEFF) character.
- Any number of comments and space characters.
- A DOCTYPE.
- Any number of comments and space characters.
- The root element, in the form of an html element.
- Any number of comments and space characters.
As you can see, the problem is not the absence of the <header> and <footer> tags, but rather the root element and the DOCTYPE.
Upvotes: 0
Reputation: 2344
Yes, However you'll probably want to start learning the semantics and newer features of the HTML5 tags, as they are likely to become more and more commonplace now.
if you require backwards compatibility with older browsers, you can always use a HTML5Shim that uses javascript to provide structure to the new tags in older browsers. (Specifically IE6,7,8)
Upvotes: 0
Reputation: 98
No, semantic element should only be used where matches the semantic meaning in HTML5.
Upvotes: 0
Reputation: 27632
No this isn't valid. 1 Error, 4 warning(s): Element head is missing a required instance of child element title. The lack of a header or footer is fine though.
See the W3C Validator
This makes it valid:
<!DOCTYPE html><head><title>title</title></head><body><h1>title</h1>content</body>
Upvotes: 2
Reputation: 14345
Yes, HTML5 just formalizes existing behaviors, and adds optional new features.
Upvotes: 0