chapter 2 markup languages: xhtml...
TRANSCRIPT
![Page 1: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/1.jpg)
CHAPTER 2MARKUP LANGUAGES:
XHTML 1.0
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
WEB TECHNOLOGIESA COMPUTER SCIENCE PERSPECTIVE
Modified by Ahmed Sallam
Based on original slides by Jeffrey C. Jackson
![Page 2: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/2.jpg)
HTML “HELLO WORLD!”
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
DocumentTypeDeclaration
DocumentInstance
![Page 3: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/3.jpg)
HTML “HELLO WORLD”
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 4: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/4.jpg)
HTML TAGS AND ELEMENTSAny string of the form < … > is a tagAll tags in document instance of Hello World are either end tags (begin with </) or start tags (all others)
• Tags are an example of markup, that is, text treated specially by the browser
• Non-markup text is called character data and is normally displayed by the browser
String at beginning of start/end tag is an element nameEverything from start tag to matching end tag, including tags, is an element
• Content of element excludes its start and end tags
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 5: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/5.jpg)
HTML ELEMENT TREE
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
RootElement
![Page 6: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/6.jpg)
HTML ROOT ELEMENTDocument type declaration specifies name of root element:<!DOCTYPE html
Root of HTML document must be htmlXHTML 1.0 (standard we will follow) requires that this element contain xmlns attribute specification (name/value pair)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 7: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/7.jpg)
HTML DOCUMENT TYPE DECLARATIONSXHTML 1.0 Strict:<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML 1.0 Frameset:<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN“"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
HTML 4.01 Transitional:<!DOCTYPE HTMLPUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN“"http://www.w3.org/TR/html4/loose.dtd">
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 8: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/8.jpg)
HTML HEAD AND BODY ELEMENTSThe body element contains information displayed in the browser client area
The head element contains information used for other purposes by the browser:
• title (shown in title bar of browser window)• scripts (client-side programs)• style (display) information• etc.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 9: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/9.jpg)
HTML HISTORY1990: HTML invented by Tim Berners-Lee1993: Mosaic browser adds support for images, sound, video to HTML1994-~1997: “Browser wars” between Netscape and Microsoft, HTML defined operationally by browser support ~1997-present: Increasingly, World-Wide Web Consortium (W3C) recommendations define HTML
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 10: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/10.jpg)
HTML VERSIONSHTML 4.01 (Dec 1999) syntax defined using Standard Generalized Markup Language(SGML)XHTML 1.0 (Jan 2000) syntax defined using Extensible Markup Language (XML)Primary differences:
• HTML allows some tag omissions (e.g., end tags)• XHTML element and attribute names are lower
case (HTML names are case-insensitive)• XHTML requires that attribute values be quoted
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 11: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/11.jpg)
SGML AND XML
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 12: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/12.jpg)
HTML “FLAVORS”For HTML 4.01 and XHTML 1.0, the document type declaration can be used to select one of three “flavors”:
• Strict: W3C ideal• Transitional: Includes deprecated elements and attributes
(W3C recommends use of style sheets instead)• Frameset: Supports frames (subwindows within the client
area)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 13: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/13.jpg)
HTML FRAMESET
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 14: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/14.jpg)
XHTML WHITE SPACEFour white space characters: carriage return, line feed, space, horizontal tabNormally, character data is normalized:
• All white space is converted to space characters• Leading and trailing spaces are trimmed• Multiple consecutive space characters are replaced by a
single space character
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 15: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/15.jpg)
XHTML WHITE SPACE
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 16: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/16.jpg)
XHTML WHITE SPACE
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 17: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/17.jpg)
UNRECOGNIZED HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Misspelledelement name
![Page 18: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/18.jpg)
UNRECOGNIZED HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
title characterdata
Belongshere
![Page 19: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/19.jpg)
UNRECOGNIZED HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
title characterdata
Displayedhere
![Page 20: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/20.jpg)
UNRECOGNIZED HTML ELEMENTSBrowsers ignore tags with unrecognized element names, attribute specifications with unrecognized attribute names
• Allows evolution of HTML while older browsers are still in useImplication: an HTML document may have errors even if it displays properlyShould use an HTML validator to check syntax
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 21: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/21.jpg)
HTML REFERENCESSince < marks the beginning of a tag, how do you include a < in an HTML document?Use markup known as a referenceTwo types:
• Character reference specifies a character by its Unicode code point
• For <, use < or < or <• Entity reference specifies a character by an HTML-
defined name• For <, use <
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 22: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/22.jpg)
HTML REFERENCES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 23: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/23.jpg)
HTML REFERENCESSince < and & begin markup, within character data or attribute values these characters must always be represented by references (normally < and &)Good idea to represent > using reference (normally >)
• Provides consistency with treatment of <• Avoids accidental use of the reserved string ]]>
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 24: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/24.jpg)
HTML REFERENCESNon-breaking space ( ) produces space but counts as part of a word
• Ex: keep together keep together …
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 25: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/25.jpg)
HTML REFERENCESNon-breaking space often used to create multiple spaces (not removed by normalization)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
+ spacedisplays as twospaces
![Page 26: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/26.jpg)
HTML REFERENCESNon-breaking space often used to create multiple spaces (not removed by normalization)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
two spacesdisplay as one
![Page 27: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/27.jpg)
XHTML ATTRIBUTE SPECIFICATIONS
Example:
Syntax:• Valid attribute names specified by HTML recommendation (or
XML, as in xml:lang)• Attribute values must be quoted (matching single or double
quotes)• Multiple attribute specifications are space-separated, order-
independent
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 28: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/28.jpg)
XHTML ATTRIBUTE VALUESCan contain embedded quotes or references to quotes
May be normalized by browser• Best to normalize attribute values yourself for optimal browser
compatibility
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 29: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/29.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 30: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/30.jpg)
COMMON HTML ELEMENTSHeadings are produced using h1, h2, …, h6elements:
Should use h1 for highest level, h2 for next highest, etc.
• Change style (next chapter) if you don’t like the “look” of a heading
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 31: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/31.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 32: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/32.jpg)
COMMON HTML ELEMENTSUse pre to retain format of text and display using monospace font:
Note that any embedded markup (such as <br /> ) is still treated as markup!
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 33: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/33.jpg)
COMMON HTML ELEMENTSbr element represents line breakbr is example of an empty element, i.e., element that is not allowed to have contentXML allows two syntactic representations of empty elements
• Empty tag syntax <br /> is recommended for browser compatibility
• XML parsers also recognize syntax <br></br> (start tag followed immediately by end tag), but many browsers do not understand this for empty elements
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 34: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/34.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 35: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/35.jpg)
COMMON HTML ELEMENTSText can be formatted in various ways:
• Apply style sheet technology (next chapter) to a spanelement (a styleless wrapper):
• Use a phrase element that specifies semantics of text (not style directly):
• Use a font style element• Not recommended, but frequently used
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 36: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/36.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 37: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/37.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 38: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/38.jpg)
COMMON HTML ELEMENTSHorizontal rule is produced using hrAlso an empty elementStyle can be modified using style sheet technology
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 39: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/39.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 40: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/40.jpg)
COMMON HTML ELEMENTSImages can be embedded using img element
Attributes:• src: URL of image file (required). Browser generates a
GET request to this URL.• alt: text description of image (required)• height / width: dimensions of area that image will
occupy (recommended)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 41: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/41.jpg)
COMMON HTML ELEMENTS• If height and width not specified for image, then
browser may need to rearrange the client area after downloading the image (poor user interfacefor Web page)
• If height and width specified are not the same as the original dimensions of image, browser will resize the image
• Default units for height and width are “picture elements” (pixels)• Can specify percentage of client area using string such as “50%”
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 42: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/42.jpg)
COMMON HTML ELEMENTSMonitor resolution determines pixel size
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
768 lines
1024 elements per line
500 pixel wide line is almosthalf the width of monitor
![Page 43: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/43.jpg)
COMMON HTML ELEMENTSMonitor resolution determines pixel size
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
1024 lines
1280 elements per line
500 pixel wide line is lessthan half the width of monitor
![Page 44: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/44.jpg)
COMMON HTML ELEMENTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 45: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/45.jpg)
COMMON HTML ELEMENTSHyperlinks are produced by the anchorelement a
Clicking on a hyperlink causes browser to issue GET request to URL specified in hrefattribute and render response in client areaContent of anchor element is text of hyperlink (avoid leading/trailing space in content)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 46: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/46.jpg)
COMMON HTML ELEMENTSAnchors can be used as source (previous example) or destination
The fragment portion of a URL is used to reference a destination anchor
Browser scrolls so destination anchor is at (or near) top of client area
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 47: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/47.jpg)
COMMON HTML ELEMENTSComments are a special form of tag
Not allowed to use -- within comment
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 48: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/48.jpg)
NESTING ELEMENTSIf one element is nested within another element, then the content of the inner element is also content of the outer element
XHTML requires that elements be properly nested
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 49: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/49.jpg)
NESTING ELEMENTSMost HTML elements are either block or inline
• Block: browser automatically generates line breaks before and after the element content
• Ex: p• Inline: element content is added to the “flow”
• Ex: span, tt, strong, a
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 50: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/50.jpg)
NESTING ELEMENTSSyntactic rules of thumb:
• Children of body must be blocks• Blocks can contain inline elements• Inline elements cannot contain blocks
Specific rules for each version of (X)HTML are defined using SGML or XML (covered later)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 51: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/51.jpg)
RELATIVE URL’SConsider an <img> start tag containing attribute specification
This is an example of a relative URL: it is interpreted relative to the URL of the document that contains the img tag
• If document URL is http://localhost:8080/MultiFile.htmlthen relative URL above represents absolute URLhttp://localhost:8080/valid-xhtml10.png
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 52: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/52.jpg)
RELATIVE URL’S
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 53: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/53.jpg)
RELATIVE URL’SQuery and fragment portions of a relative URL are appended to the resulting absolute URL
• Example: If document URL is http://localhost:8080/PageAnch.htmland it contains the anchor element
then the corresponding absolute URL is http://localhost:8080/PageAnch.html#section1
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 54: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/54.jpg)
RELATIVE URL’SAdvantages:
• Shorter than absolute URL’s• Primary: can change the URL of a document (e.g., move
document to a different directory or rename the server host) without needing to change URL’s within the document
Should use relative URL’s whenever possible
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 55: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/55.jpg)
LISTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 56: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/56.jpg)
LISTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Unordered List
Ordered List
Definition List
List Items
![Page 57: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/57.jpg)
LISTS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 58: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/58.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Rules
RulesBorders
![Page 59: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/59.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Table Row
Table Data
Border 5 pixels, rules 1 pixel
![Page 60: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/60.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 61: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/61.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Table Header
![Page 62: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/62.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 63: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/63.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
cellspacing cellpadding
![Page 64: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/64.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
cellspacing cellpadding
![Page 65: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/65.jpg)
TABLES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
cellspacing cellpadding
![Page 66: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/66.jpg)
FRAMES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 67: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/67.jpg)
FRAMES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
1/3,2/3 split
![Page 68: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/68.jpg)
FRAMESHyperlink in one frame can load document in another:
Value of target attribute specification is id/name of a frame
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 69: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/69.jpg)
FRAMESUser interface issues:
• What happens when the page is printed?• What happens when the Back button is clicked?• How should assistive technology “read” the page?• How should the information be displayed on a small
display?Recommendation: avoid frames except for applications aimed at “power users”
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 70: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/70.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
![Page 71: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/71.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Each form is content of a form element
![Page 72: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/72.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
action specifies URL where form data is sent in an HTTP request
![Page 73: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/73.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
HTTP request method (lower case)
![Page 74: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/74.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
div is the block element analog of span (no-style block element)
![Page 75: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/75.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Form control elements must be content of a block element
![Page 76: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/76.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Text field control (form user-interface element)
![Page 77: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/77.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Text field used for one-line inputs
![Page 78: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/78.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 79: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/79.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Name associated with this control’s data in HTTP request
![Page 80: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/80.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Width (number of characters) of text field
![Page 81: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/81.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
input is an empty element
![Page 82: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/82.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Use label to associate text with a control
![Page 83: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/83.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Form controls are inline elements
![Page 84: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/84.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
textarea control used for multi-line input
![Page 85: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/85.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Height and width in characters
![Page 86: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/86.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
textarea is not an empty element; any content is displayed
![Page 87: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/87.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 88: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/88.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Checkbox control
![Page 89: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/89.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Value sent in HTTP request if box is checked
![Page 90: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/90.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Controls can share a common name
![Page 91: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/91.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Submit button: form data sent to action URL if button is clicked
![Page 92: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/92.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 93: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/93.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Form data (in GET request)
![Page 94: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/94.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Displayed on button and sent to server if button clicked
![Page 95: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/95.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Radio buttons: at mostone can be selected ata time.
![Page 96: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/96.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Radio button control
![Page 97: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/97.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
All radio buttons with the same name form a button set
![Page 98: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/98.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Only one button of a set can be selected at a time
![Page 99: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/99.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
This button is initially selected(checked attribute also appliesto check boxes)
![Page 100: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/100.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Boolean attribute: default false,set true by specifying name asvalue
![Page 101: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/101.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Represents string: >50
![Page 102: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/102.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Menu
![Page 103: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/103.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Menu control; name given once
![Page 104: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/104.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Each menu item has its own value
![Page 105: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/105.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Item initially displayed in menucontrol
![Page 106: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/106.jpg)
FORMSOther form controls:
• Fieldset (grouping)• Password• Clickable image• Non-submit buttons• Hidden (embed data)• File upload• Hierarchical menus
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 107: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/107.jpg)
FORMS
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 108: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/108.jpg)
XML DTDRecall that XML is used to define the syntax of XHTMLSet of XML files that define a language are known as the document type definition (DTD)DTD primarily consists of declarations:
• Element type: name and content of elements• Attribute list: attributes of an element• Entity: define meaning of, e.g., >
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 109: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/109.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type name
![Page 110: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/110.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 111: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/111.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 112: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/112.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 113: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/113.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 114: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/114.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 115: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/115.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 116: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/116.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 117: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/117.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
<!ELEMENT textarea (#PCDATA)>
![Page 118: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/118.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
<!ELEMENT textarea (#PCDATA)>
![Page 119: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/119.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 120: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/120.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 121: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/121.jpg)
XML ELEMENT TYPE DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type content specification (or content model)
![Page 122: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/122.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 123: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/123.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 124: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/124.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 125: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/125.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 126: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/126.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 127: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/127.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 128: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/128.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 129: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/129.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 130: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/130.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header followed by
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 131: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/131.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header followed by optional footer
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 132: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/132.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header followed by optional footer then
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 133: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/133.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header followed by optional footer then• One or more tbody elements
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 134: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/134.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header followed by optional footer then• One or more tbody elements or
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 135: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/135.jpg)
XML ELEMENT TYPE DECLARATION
Child elements of table are:• Optional caption followed by• Any number of col elements or any number of colgroup
elements then• Optional header followed by optional footer then• One or more tbody elements or one or more tr elements
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 136: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/136.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Element type name
![Page 137: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/137.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Recognized attribute names
![Page 138: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/138.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Attribute types(data types allowed as attribute values)
![Page 139: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/139.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
ASCII characters: letter, digit, or . - _ :
![Page 140: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/140.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Attribute value must be ltr or rtl
![Page 141: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/141.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Like NMTOKEN but must begin with letter or _ :Attribute value must be unique
![Page 142: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/142.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Any character except XML special characters < and &or the quote character enclosing the attribute value
![Page 143: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/143.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 144: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/144.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Attribute default declarations
![Page 145: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/145.jpg)
XML ATTRIBUTE LIST DECLARATION
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 146: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/146.jpg)
XML ENTITY DECLARATIONEntity declaration is essentially a macroTwo types of entity:
• General: referenced from HTML document using &
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Entity name
![Page 147: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/147.jpg)
XML ENTITY DECLARATIONEntity declaration is essentially a macroTwo types of entity:
• General: referenced from HTML document using &
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Replacement text;recursively replaced if it is a reference
![Page 148: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/148.jpg)
XML ENTITY DECLARATIONEntity declaration is essentially a macroTwo types of entity:
• General: referenced from HTML document using &
• Parameter: reference from DTD using %
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 149: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/149.jpg)
XML ENTITY DECLARATIONEntity declaration is essentially a macroTwo types of entity:
• General: referenced from HTML document using &
• Parameter: reference from DTD using %
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
![Page 150: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/150.jpg)
DTD FILES
DTD document contains element type, attribute list, and entity declarationsMay also contain declaration of external entities: identifiers for secondary DTD documents
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
System Identifier: URL for primary DTD document
![Page 151: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/151.jpg)
DTD FILES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
External entity name
![Page 152: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/152.jpg)
DTD FILES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
System identifier (relative URL)
![Page 153: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/153.jpg)
DTD FILES
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights
Entity reference; imports content (entity declarations, called entity set) of external entity at this point in the primary DTD
![Page 154: CHAPTER 2 MARKUP LANGUAGES: XHTML 1sallamah.weebly.com/uploads/6/9/3/5/6935631/webtech-2015-f-02.pdf · HTML TAGS AND ELEMENTS Any string of the form < … >is a tag All tags](https://reader030.vdocument.in/reader030/viewer/2022040612/5f02e7c67e708231d40697e3/html5/thumbnails/154.jpg)
HTML CREATION TOOLS Mozilla Composer
Microsoft FrontPageMacromedia DreamweaverNotepad++Etc.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights