Professional Documents
Culture Documents
Introduction to XHTML
• Basic Syntax
• Images
• Hypertext Links
• Lists
• Tables
• Forms
• Frames
• Syntactic differences between HTML and XHTML
Line Breaks:
<br />
- slash indicates that the tag is both an opening
and closing tag
<h1> … </h1>
:
:
<h6> .. </h6>
Attributes:
Src, Alt, width, height
Ex: <imag src=“abc.jpg” alt =“Picture Not
Available” />
Ordered Lists:
<ol> - creates an ordered list with Type as
attribute
<li>- To specify each element in the list
CellPadding:
used to specify the spacing between the contents of a cell and the inner walls
of the cell. This is often used to prevent text in a cell from being too close to
the edge of the cell.
<table border="1" cellpadding="10">
<tr>
<td>some text</td>
<td>some text</td>
</tr><tr>
<td>some text</td>
<td>some text</td>
</tr>
</table>
08/24/23 Chapter 2. Introduction to XHTML 30
Contd..
CellSpacing:
Used to specify the distance between cells in a table
<table border="1" cellspacing="5">
<tr>
<td>some text</td>
<td>some text</td>
</tr><tr>
<td>some text</td>
<td>some text</td>
</tr>
</table>
Default is GET
Select Tag
<select name="gender" size="1">
<option value ="f" selected> female </option>
<option value ="m"> male </option>
</select>
</frameset>
</html>
insensitive
In XHTML, all tag and attribute names must be in
lowercase
Closing tags:
In HTML, closing tags may be omitted if the
processing agent (browser) can infer their presence.
In XHTML, all elements must have closing tags.