UNIT-1 Introduction To XHTML
UNIT-1 Introduction To XHTML
Introduction to
XHTML
2. HTML processors do not even enforce the few syntax rule that do exist in HTML
– The opening tag and its closing tag together specify a container for the content they enclose
<!-- headings.html
An example to illustrate headings
-->
<html xmlns = ″http://www.w3.org/1999/xhtml″>
<head> <title> Headings </title>
</head>
<body>
<h1> Aidan’s Airplanes (h1) </h1>
<h2> The best in used airplanes (h2) </h2>
<h3> "We’ve got them by the hangarful" (h3)
</h3>
<h4> We’re the guys to see for a good used
airplane (h4) </h4>
<h5> We offer great prices on great planes
(h5) </h5>
<h6> No returns, no guarantees, no refunds,
all sales are final (h6) </h6>
</body>
</html>
• Blockquotes
– Content of <blockquote>
– To set a block of text off from the normal flow and appearance of text
– Browsers often indent, and sometimes italicize
• Font Styles and Sizes (can be nested)
– Boldface - <b>
– Italics - <i>
– Larger - <big>
– Smaller - <small>
– Monospace - <tt>
• All of this font size and font style stuff can be done with style sheets, but these tags are not
yet deprecated
• Character Entities
Char. Entity Meaning
& & Ampersand
< < Less than
> > Greater than
” " Double quote
’ ' Single quote
¼ ¼ One quarter
½ ½ One half
¾ ¾ Three quarters
° Degree
(space) Non-breaking space
• Horizontal rules
– <hr /> draws a line across the display, after a line break
• The meta element (for search engines) Used to provide additional information about a
document, with attributes, not content
• Style note: a link should blend in with the surrounding text, so reading it without
taking the link should not be made less pleasant
• Links can have images:
<a href = "c210data.html“>
<img src = "smallplane.jpg"
alt = "Small picture of an airplane " />
Info on C210 </a>
• Unordered lists
• The list is the content of the <ul> tag
• List elements are the content of the <li> tag
<h3> Some Common Single-Engine Aircraft </h3>
<ul>
<li> Cessna Skyhawk </li>
<li> Beechcraft Bonanza </li>
<li> Piper Cherokee </li>
</ul>
• Ordered lists
• The list is the content of the <ol> tag
• Each item in the display is preceded by a sequence value
• Nested lists
• Any type list can be nested inside any type list
• The nested list must be in a list item
- Table Sections
- Header, body, and footer, which are the elements: thead, tbody, and tfoot
- If a document has multiple tbody elements, they are separated by thicker horizontal
lines
• When the Submit button of a form is clicked, the form’s values are sent
to the server
• All of the widgets, or components of a form are defined in the content of
a <form> tag
– The only required attribute of <form> is action, which specifies the URL of the
application that is to be called when the Submit button is clicked
action =
"http://www.cs.ucp.edu/cgi-bin/survey.pl"
» If the form has no action, the value of action is the empty string
• Widgets
– Many are created with the <input> tag
» The type attribute of <input> specifies the kind of widget being created
1. Text
• Creates a horizontal box for text input
• Default size is 20; it can be changed with the size attribute
• If more characters are entered than will fit, the box is scrolled (shifted) left