HTML and CSS Reference
In-Depth Information
A minimal HTML document can be created out of the earlier fragment
by adding these three necessary elements and a title:
<html>
<head>
<title>Minimal document</title>
</head>
<body>
<p>A paragraph
<em>with emphasis</em></p>
</body>
</html>
You can create an HTML document
yourself by opening a text editor,
copying this code into it, and saving
it as a file with the extension .html.
After you've done that, double-
clicking the file will open it in your
browser.
As you see more complex documents with many more elements, bear in
mind that ultimately the browser turns them into a tree like this. When
you're applying CSS or doing scripting, it's common to think in terms
of nodes in this tree rather than elements in the document.
Markup, parsing, and rendering
The activity of taking plain text (the content) and turning it into an HTML docu-
ment is called marking up : adding markup to the plain text to indicate which bits
of it are headings, paragraphs, bulleted lists, and links. Note that after a text
document has been marked up into HTML, it's still also a text document. You
can open it in Notepad or any other text editor, and it's treated like any other
plain text. Only when the text document is loaded into a browser does it become
a hypertext document. When a string of text like “<p>A paragraph</p>” is de-
scribed as “a paragraph element,” that's shorthand for “this string of text, when
read by the right piece of software under the right conditions, will create within
that software an entity that is a paragraph element.” The process of taking the
text file containing the markup and turning it into the tree-like representation of
an HTML document is called parsing . The process of taking that tree and show-
ing it to the user is called rendering .
Search WWH ::




Custom Search