Class Notes:  week 1

In the book chapter two.

First lets check out this web thing

    Can we do something like this??

   

What is HTML? What is XHTML?

 

    Do you need help or are you just browsing?

Browsers

(IE vs Firefox on a PC ) vs (Firefox vs IE vs Safari on a Mac)
 

    Lets get started!!

Tag you're it!


-Throughout the semester with almost every new concept I introduce I will be introducing a new set of tags and attributes to go with it.

A tag (or element) is an html code that is enclosed in angel brackets <>. They are used to lay out the web page. The  <br/> (empty tag) for example will add a line break.

Most tags however are of the container type. These tags have both a starting tag and an end tag. For example, if I wanted to bold a word I would surround that word with the starting and ending <b> </b> tag. Notice that the end tag is the same as the starting tag but with a "/" placed in front.

   <b> HI WORLD </b> would produce HI WORLD as output on the screen.

An attribute is a special code that can enhance or modify a tag. They are generally located in the starting tag after the tag name.

 <p align="center"> jkfahljkghadfjhgaouhoaruehgihraeg </p> would display this horrible paragraph to the center of the browser window.

To be compliant with the new html standard (xhtml), all tags and attributes must be in lower case. In addition, all values of attributes need to surrounded by quotes. Here is the basic syntax for xhtml tags and attributes

<tag attribute="value">   </tag>

ALL tags need to be closed! 

examples <h1> Hello World </h1> <br/>

 

OK Now how do I make one of these web pages??

First you need to pick an application to produce your web page.

Please, make a "note" of this.....

    HTML(text) editor vs. Web editor

 

Basic HTML template.

<html>

<head>

<title>  </title>

</head>

<body>

</body>

</html>

 

Creating an XHTML Source Document.

How do we go from html to xhtml?

Since XHTML is based on XML and NOT HTML, it inherits the syntax rules of XML.
One of the primary syntax rules concerning us the case sensitivity.  HTML is NOT case sensitive, however, XHTML is.  ALL XHTML TAGS NEED TO BE IN LOWER CASE.

Basic XHTML Template.

Two steps to go from HTML to XHTML

  1. Add the following two cryptic lines BEFORE the <html> tag
     
  2. Add the following attribute to the <html> tag

Other XHTML syntax issues:

All attributes need to be in lower case. Values that these attributes hold will be placed AFTER an "=" sign and contained in quotes.

This leaves us with: (page 29-32 in book)

<?xml version="1.0"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www/w3/org/TR/xhtml/11/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>  </title>

</head>

<body>

</body>

</html>

To the tags!

<meta/> The meta tag is used to specify Keywords that describe a documents contents as well as a short description.

Two necessary attributes. "name" & "content"

<meta name="keywords" content="baseball, soccer, tennis"/>
<meta name=""description" content="Sports information page"/>

<p></p> The paragraph tag. Used so separate text within a web page. Container type. Will provide line breaks.

Key attribute : align.

<p align="center">

<br/> used for line break

Headings

<h1> Header one </h1>
<h2> Header two </h2>
<h3> Header three </h3>
<h4> Header four </h4>
<h5> Header five </h5>
<h6> Header six </h6>

<em> italics </em>

<strong> bold  </strong>

<font> </font> (not supported in XHTML Strict)

Key attributes: size, face, color.