HTML/xHTML
The core of the Web is a structured coding language. That langauge is the heart of what you will learn in this class.
All html tags are inclosed in greater-than and less-than signs (< and >). Every xHTML document has a head and body. The body houses all the information that is displayed in the browser window and the head of the document houses information for the browser software about the document itself (title and meta tags, for example).
HTML, or Hypertext Markup Language, is coding language used to create Web documents. A Web browser reads the HTML and translates it into the Web pages seen on a computer screen. Understanding HTML is the key to learning to create Web pages. XHTML is an acronym for "eXtensible HyperText Markup Language", a reformulation of HTML 4.0 as an XML 1.0 application. XHTML provides the framework for future extensions of HTML and will likely to replace HTML in the future. Although we talk about HTML in this class, what we learn is mostly XHTML--it's just that "HTML" is easier to say (and spell).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of Document</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<body bgcolor="#FFFFFF">
<h1>Hello</h1>
<hr / >
<p><span style="font-face:Trebuchet MS, Arial, Helvetica, sans-serif; font-size:12pt">This is a basic Web page. </span></p>
</body>
</html>Critical things to remember about xhtml:
- All the code inside < > should be lowercase.
- All xhtml files are purely text files (ie text only) and should be saved as text only with a .htm or .html extension, no spaces and no capital letters or funky symbols such as @, $, &, etc..
- Every tag that you open has to be closed.
- Be hyper-aware of what you are saving, where you are saving it, and when.
- When you are writing code for the Web, you will usually have three applications open at one time: an an application to edit the xhtml, and a couple of browsers.
Why the Web is not print
A Website or page is never really complete, it is a living, evolving document and should be treated as such
A Website will never look the same to everyone, due to Web design variables. Be aware that these variables (covered throughout the course) make it almost impossible to please everyone. As a good Web coder, however, your job is to make the work you are coding look the best to the majority of your viewing audience.
Viewing Web files
You can view Web files locally by opening them in a Web browser. You can only view Web files over the Internet if you upload them to a Web server somewhere.
The HTML code for any Web page is easy to see. Select the "view" command on the browser's menu bar and choose "page source".
Viewing the source in Internet Explorer
![]()
Viewing the source in Mozilla/Netscape
Or, right-click the mouse over any text on the Web page, and choose "view source" from the pop-up menu. (Macintosh users would, of course, apple-click to get the pop-up menu.)