HTML and CSS Reference
In-Depth Information
defining the root element: <html>
The primary container for any web page is the <html> element. All content processed by the browser
must be contained within an <html>… </html> pair. Because <html> is the outermost container, it is
known as the root element.
root element.
The HTML page so far looks like this:
<!DOCTYPE html>
<html>
</html>
One key browser feature can make web pages much more readable. By default,
browsers consider all white space — spaces between words and carriage
returns — except for a single space, to be extraneous and ignore it. This allows
coders to use line breaks, extra lines, and indentations to format their output
for easy reading. Feel free to use as much, or as little, white space as you like in
your code.
Forming the <head>
Within the root <html> tag are two main structural branches: the <head> and the <body> . The
head section contains information about the current document, often referred to as metadata . This
metadata may include the title of the document, keywords and descriptions that describe the page,
author details, and copyright statements among other information. Almost all of the content within
the <head>… </head> tag pair is hidden from immediate public view; that is, outside of the <title>
tag, content in the head is not rendered in the browser. It is intended to be used by the external agents,
such as search engine spiders, to gather information about the page as well as to serve as the central
storage facility for other code (like links to JavaScript or cascading style sheets) that affect the presen-
tation of the page.
The <head> tag is contained within the <html> element, directly after the opening root element,
like this:
<!DOCTYPE html>
<html>
<head>
</head>
</html>
As noted earlier, it's okay to use white space, like we have here, to indent code. Such indentations,
accomplished either with tabs or spaces, are often used to represent the level of nesting.
Search WWH ::




Custom Search