HTML and CSS Reference
In-Depth Information
< title>Page Title Goes Here</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
... body information goes here
What if I'm using a Mac?
No worries! Use the Mac's built-in TextEdit application—but first you'll need to set some prefer-
ences. Launch TextEdit and select Preferences.
Set the new document format to plain text.
Set the saving option to not save documents with a .txt extension.
Set the rich text processing preference to: Ignore rich text commands in HTML files.
See for more configuration information. Now you're
ready to edit Web pages with TextEdit! As you follow along with the topic, just launch TextEdit
when you are directed to use Notepad.
Launch Notepad or another text editor and type in the following XHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" lang="en" xml:lang="en">
<title>My First Web Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Hello World
Notice that the first lines in the file contain the DTD. The XHTML code begins with an
opening <html> tag and ends with a closing </html> tag. The purpose of these tags is
to indicate that the content between the tags makes up a Web page. The head section is
delimited by <head> and </head> tags and contains a pair of title tags with the words
“My First Web Page” in between along with a <meta /> tag to indicate the character
encoding. The meta tag is used alone—it is not used as a pair of opening and closing
tags. It is considered to be a stand-alone or self-contained tag. Because you are using
XHTML (which follows XML syntax), the meta tag is coded with an ending />, which
indicates a self-contained tag. The body section is delimited by <body> and </body>
Search WWH ::

Custom Search