XHTML
XHTML
▪ Browsers ignore XHTML comments that will not be displayed on the web browser
<p> Mary had a little lamb, </p> <p> its fleece was
white as snow. </p>
Output:
Mary had a little lamb,
Output:
Mary had a little lamb,
its fleece was white as snow.
<pre>
CBIT
B.E-3/4,CSE-2
hyderabad
</pre>
OUTPUT:
CBIT
B.E-3/4,CSE-2
hyderabad
OUTPUT
Output
21-08-2020 PREPARED BY: E. SWATHI, ASST. PROF., CSE, CBIT 13
Block Quotations
▪ Block quotations set off the block of text from the normal flow of text in a document.
▪ Browser designers determine how the content of <blockquote> can be made to look
different from the surrounding text.
<body>
<blockquote>Browsers generally render blockquote text as indented text. If your
quoted text needs to display within a non-quoted paragraph, you should use the
HTML q tag. Most browsers surround q text with quotation marks.</blockquote>
<q>Browsers generally render blockquote text as indented text. If your quoted text
needs to display within a non-quoted paragraph, you should use the HTML q tag.
Most browsers surround q text with quotation marks.</q>
</body>
OUTPUT:
Example
<img src=“file.jpg” widht=“500” height= “400” alt= “ no image”/>
<a href="http://www.cbit.ac.in">
<img src=“cbitlog.jpg" alt="notvisiting" width=“50" height=“50"/>
</a>
Example:
<ol>
<li>IT</li>
<li>CSE</li> OUTPUT
<li>ECE</li>
<li>EEE</li>
</ol>
a Lowercase
1(default) Numbers
Example:
<ul>
<li>IT</li> OUTPUT
<li>CSE</li>
<li>ECE</li>
<li>EEE</li>
</ul>
Example:
<table border="2">
<tr>
<th>studentName</th>
<th>Rollno</th>
<th>phoneno</th>
</tr> OUTPUT
<tr>
<td>RAm</td>
<td>999</td>
<td>123456789</td>
</tr>
</table>
Example:
<table border="2" cellpadding="15">
<tr>
<th>studentName</th>
<th>Rollno</th>
<th>phoneno</th> OUTPUT
</tr>
<tr>
<td>RAm</td>
<td>999</td>
<td>123456789</td>
</tr>
</table>
Example:
<table border="2" cellspacing="15">
<tr>
<th>studentName</th>
<th>Rollno</th>
<th>phoneno</th>
</tr> OUTPUT
<tr>
<td>RAm</td>
<td>999</td>
<td>123456789</td>
</tr>
</table>
Example:
<table border="2">
<tr>
<th>studentName</th>
<th>Rollno</th>
<th colspan="2">phoneno</th>
OUTPUT
</tr>
<tr>
<td>RAm</td>
<td>999</td>
<td>123456789</td>
<td>9412698267</td>
</tr>
</table>
<tr align=“center”>
</tr>
<tr> OUTPUT
<td align=“right”> 1 </td>
</tr>
<tr>
</tr>
21-08-2020 PREPARED BY: E. SWATHI, ASST. PROF., CSE, CBIT 40
</table>
HTML FORMS
▪ HTML elements gives styles and meaning to a web site. To add interactivity to a web
page forms to be used.
▪ User needs to provide his own input . These type of interaction include:
◦ Sign up and login into a web site
◦ Enter personal information ( name, address, email, phone no etc)
◦ Filtering content( dropdowns, checkboxes)
◦ Perform a search
◦ Uploading files
</form>
OUTPUT:
OUTPUT:
</form>
OUTPUT:
Radio buttons:<br/>
<input type="radio" name="radiobutton" value="1“/>male<br/>
<input type="radio" name="radiobutton" value=“2”checked=“checked”/> female
OUTPUT:
A submit button:
<input type="submit" name="Submit" value="Submit">
A reset button:
<input type="reset" name="Submit2" value="Reset"> OUTPUT
A plain button:
<input type="button" name="Submit3" value="Push Me">
<form>
<center>
<h1>using text area</h1>
<textarea name="textarea" rows="2" cols="24">hello</textarea> OUTPUT
</center>
</form>
▪ To insert the values in the dropdown list we use the tag <option>
▪ Syntax:
<option value= “string” [selected]> …. </option>
Example:
<select name=“countries”>
<option value=“1” selected=“selected”> India</option>
OUTPUT
<option value=“2”> Srilanka</option>
<option value=“3”> Bangladesh</option>
</select>
Name Name of the frame Name defines a unique name for the
frames. It works like the name attribute
of other tags.
<html xmlns="http://www.w3.org/1999/xhtml">
<frameset cols="50,50">
<frame src="framelinks_swa.xhtml" name="col1"/>
<frame name="col2"/> OUTPUT
</frameset>
</html>