HTML Basic elements (and elements that
don’t contain anything)
[this page | pdf | back links]
The
following is a list of HTML basic
elements that every HTML page is supposed to contain (although if a <!DOCTYPE> element is not
present then essentially all modern browsers will assume that the page is an
HTML page, and, as explained in HTML Getting
Started, you can often also dispense with the <title> element (and potentially also the <html>, <head> and <body>
elements).
Tag
|
Description
|
More
|
Further comments
|
<!DOCTYPE>
|
Document type
|
Here
|
|
<body>
|
The body of the
document
|
Here
|
|
<head>
|
Provides information about
the document
|
Here
|
|
<html>
|
Is the root node of an
HTML document
|
Here
|
Only <!DOCTYPE>
elements should appear outside the <html> element
|
<title>
|
Title for document
|
Here
|
Appears in <head>
|
The <head> element can also be
deemed a metadata
element, as it forms part of the way in which metadata is included in such a
document.
Three other elements are
also typically considered ‘basic’, either because they don’t contain anything
or because they comment out other material:
Tag
|
Description
|
More
|
Further comments
|
<!-- … -->
|
A (potentially
multiline) comment
|
Here
|
|
<br>
|
A single line break
(c.f. a carriage return)
|
Here
|
|
<hr>
|
Indicates a thematic
change in the content
|
Here
|
Often rendered as a
line across the window
|
The default styles
applicable to these elements are shown here.
NAVIGATION LINKS
Contents | Prev | Next | HTML Elements