Transcript Document

Reading & Exam

Zeid: Chapter 9: XHTML Essential  p. 241-298  Read before EXAM 1 Exam is Monday Oct. 25 th  Review on Friday Oct. 22 nd

Agenda

Three definitions of a web page Website vs. web page HTML vs. XHTML XHTML document structure Important HTML tags

Three definitions of a web page

Document View.

The easiest way to define a web page is to think of a web page as a single HTML document.

For instance, in your public_html folder there may be two web pages  index.html

 style.html

Three definitions of a web page

Browser Display View

The Document View does NOT necessarily define a web page Web pages can include images and data that are stored separately from the HTML document.

Perhaps a better definition is to consider a web page to be all of the content that is visible in a web browser when a page is displayed.

Three definitions of a web page

URL View

The Browser Display View does NOT necessarily define a web page either Web pages can include meta tags and other information that is never displayed.

Also, web browsers display content differently.

Another definition of a web page: All of the content that is potentially available at a URL.

Three definitions of a web page

A Fourth View (combination of the three)

The URL view implies that a simple .gif or .jpg file would be considered a web page.

 That’s OK in general, but I won’t count that as a web page in this course.

Fourth Definition:

An HTML document that is available via a URL, including any content that can potentially be displayed when opening the URL in a Web Browser.

 If the URL changes consider it a different web page.

Website vs. web page

Link Definition:

A collection of web pages that are connected via hyperlinks  One of my web pages links to RPI’s website. Does that mean that my website and RPI’s website are the same?

Website vs. web page

Server Definition:

A collection of web pages that are stored on the same web server.

 But, some websites ( www.yahoo.com

) have content that is stored on multiple servers  However, the URL is always the same

Website vs. web page

URL Definition:

A collection of web pages that are available via the same URL Domain.

 Example: www.cs.siena.edu/  But, my Bea Arthur Tribute has nothing to do with Computer Science and Siena College.

Website vs. web page

Content Definition:

A collection of inter-connected web pages devoted to a particular topic or concept, where each page is authored by a particular person or group of people.

 This definition is my favorite.

HTML vs. XHTML

HTML stands for HyperText Markup Language The concept of hypertext was invented in 1968.

HTML was invented by Tim Berners-Lee in 1991.

HTML is a set of syntax (tags) for annotating documents on the WWW.

Web browsers simply interpret the syntax.

HTML is a subset of SGML (Standard Generalized Markup Language) SGML was a general syntax for annotating any kind of document (IBM 1960’s)

HTML vs. XHTML

XML stands for Extensible Markup Language.

XML is also a subset of SGML that is designed to be more useful.

XML is basically a set of syntax for defining tags.

Thus, you can use XML do define your own markup tags for any kind of document.

XML is used extensively so that different systems can share data and documents.

HTML vs. XHTML

To enhance HTML, The WorldWide Consortium ( www.w3c.org

) modified HTML to conform to the XML standards.

XHTML is simply HTML code that conforms to the XML standards.

Page 247 describes how XHTML syntax is different than HTML syntax.

Before we can learn about these differences we will learn about HTML.

HTML Document Structure

Everything in here will be interpreted as an html document

HTML Document Structure

Title, meta information, style sheet links, javascript code...

Visible body of the web page.

XHTML Document Structure

Title, meta information, style sheet links, javascript code...

Visible body of the web page.

Tag

Displayed in Title Bar

Tag

The body tag has a lot of attributes How many attributes are there?

Tag

Defines a paragraph Using CSS styles you can redefine the indent

Here you can give a paragraph a text style.

You can never redefine the blank line created by a new paragraph.

Tag

Header 1  24pt

Header 2  18pt

Header 3  14pt CSS styles have made these obsolete

Other Text Formatting Tags

Bold

Italic

Emphasis

 Same as on most browsers

Bolder

 Same as on most browsers Smaller Font   Font size depends on browser (8-10pt) May not be smaller if you’re already using 10pt font

Other Text Formatting Tags

  This is how DreamWeaver controls indenting However, its NOT like a tab   diplayed withfixed-width font what is a fixed-width font anyway?

 
  displayed verbatim w/ fixed-width font counts white-space and new lines
  just like

but does not create a blank line more robust than
because you can specify alignment

Single Tags


 Line break


 Horizontal rule   Can change color, size, width, shading, etc.

Won’t properly display in DreamWeaver  Image is inserted (native size)  If you specify a different size the browser is responsible for re-scaling  Many optional attributes

XHTML Requirement

HTML allows single tags  i.e.,


XML requires every tag to be closed with  Start tag (Tag is opened)  End tag (Tag is closed) Single tags must be closed.

 i.e.,


(Open and closed in one tag).

Special Characters

&#code  2 to 4 digit code is used  See tables 9.3-9.5 on page 259  A picture is worth a thousand words.

Some special characters have non-numeric codes   i.e.,   Many of these don’t work unless the browser has an extended character set plug-in installed.

Anchor Tag

Actual Link  Standard hyperlink to webpage  Places an anchor in a document  Hyperlink to the label  Intra-document link  Somewhat obsolete. Why?

Lists

Ordered Lists (numbered)

  1. list item1
  2. list item2
  3. list item3
Unordered Lists (bulleted)
    Can be nested; Example