lecture02 - XHTML Essentials and Forms Reading: [1] Zeid,...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 2 XHTML Essentials and Forms Reading: [1] Zeid, Ch.9 &15; [2] Castro, Ch. 3-7 &15; [3] Sebesta, Ch. 2; http://www.cs.man.ac.uk/~kechen/pages/teaching/comp17032
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 2 Goals and Objectives Goals Understand XHTML syntax and rules and master the authoring of Web pages by a text editor to generate XHTML code with an emphasis on forms Objectives XHTML document structure Basic elements of XHTML Data collection over the web Front and back ends Communication cycle Elementary form elements
Background image of page 2
COMP17032 Web Technology and Practice 1 3 A web site is a collection of web pages A web author begins with a home page which includes hyperlinks to other web pages The home page of a web site is the first web page that is loaded when a surfer visits the web site The file name of the home page is usually index.html or home.htm Web sites and pages
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 4 After a web page is designed one needs to use HTML or XHTML code to author a web page HTML is platform independent and easy to use XHTML 1.0 is a rewrite of HTML 4.01 in XML format, which is recommended by W3C XHTML syntax is stricter than HTML syntax The two types of editors are: Text type in the code and view results later HTML view results as you develop the web page Authoring of Web Pages
Background image of page 4
COMP17032 Web Technology and Practice 1 5 <?xml version=“1.0” encoding=“iso-8859-1”?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml.dtd”> <html xmlns=“http://www.w3.org/1999/xhtml”> <head> <meta name=“author” content=“Zeid” /> <title>HTML document structure</title> </head> <body> Web page content goes here </body> </html> XHTML Document Structure Declaration Content
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 6 XHTML uses tags that are enclosed in brackets ( < , > ) The XHTML content is enclosed between the tags The tags and content form an XHTML element The generic form is: <start-tag>content<end-tag> The detailed form is: <tag-name [att1=“val1” att2=“val2” …]>content</tag-name> Start and end tags have same name with a forward slash / before the end tag; e.g. <b>This is BOLD</b> The tag attributes enclosed in [ and ] are optional and can be assigned values for more control over formatting XHTML Syntax
Background image of page 6
COMP17032 Web Technology and Practice 1 7 XHTML tags can be nested according to the first open, last closed rule; <b><i>Bold and Italic</i></b> XHTML rules: 1. Tags must be closed 2. Empty tags must be closed 3. Use lower case tags 4. Whitespace matters 5. Attributes must be enclosed in quotes 6. Tags must not overlap (be careful when nesting) 7. Comments can be used 8. XHTML uses escaped characters Do not use Deprecated or obsolete tags XHTML Syntax
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 8 Text is one of the
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 36

lecture02 - XHTML Essentials and Forms Reading: [1] Zeid,...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online