Vous êtes sur la page 1sur 16

Use of headings

<html> <body> <h1>I am using HTML.</h1> <h2>I am using HTML.</h2> <h3>I am using HTML.</h3> <h4>I am using HTML.</h4> <h5>I am using HTML.</h5> <h6>I am using HTML.</h6> </body> </html>

Use of paragraph tag

<html> <body> <p>the term hypertext is used to describe the text and contains links to other text, hypermedia is another extension to hypertext that supports linking graphics,sound, and video elements in addition to text elements.</p> </body> </html>

Background color in HTML

<html> <body style="background-color:teal"> <h2 style="background-color:red">This is a heading</h2> <p style="background-color:green">This is a paragraph.</p> </body> </html>

Different font tag attributes


<html> <body style="background-color:teal"> <h2 style="background-color:red">This is a heading</h2> <p style="background-color:green">This is a paragraph.</p> <font size="7" color="blue" face="monotype corsiva">font tags are used to give color and different styles to the text. </font> </body> </html>

Ordered list
<html><head>list tag : -<title>HTML</title></head> <body><p>we will study:-<font color="red" size="5" face="verdana"><b><i><u></u></i></b></font></p> <ol> <li> <font color="red" size="3" face="verdana"><b>COMPUTER CONCEPTS</b></font> <li> <font color="red" size="3" face="verdana"><b>MS-WINDOWS</b></font> <li> <font color="red" size="3" face="verdana"><b>MS-EXCEL</b></font> <li> <font color="red" size="3" face="verdana"><b>MS-WORD</b></font> <li> <font color="red" size="3" face="verdana"><b>FOXPRO</b></font> </ol></body></html>

Unordered list
<html>

<head>unordered list<title>L</title></head> <body> <p> <font color="red" size="5" face="verdana"><b><i><u>we will use unordeed list here,it will show data with bullets.</u></i></b></font></p> <ul> <li><font color="blue" size="3" face= "monotype corsiva"><b>COMPUTER CONCEPTS</b></font> <li><font color="blue" size="3" face= "monotype corsiva"><b>MSWINDOWS</b></font> <li><font color="blue" size="3" face= "monotype corsiva"><b>MS-EXCEL</b></font> <li><font color="blue" size="3" face= "monotype corsiva"><b>MS-WORD</b></font> <li><font color="blue" size="3" face= "monotype corsiva"><b>FOXPRO</b></font> </body> </html>

<html> <head>controlling display of unordered list<title>HTML</title></head> <body><ul type="square"> <li>SOFTWARE</li> <ul type="disc"> <li>MS-WINDOWS <li>MS-EXCEL <li>MS WORD <li>FOXPRO </ul><li> HARDWARE <ul type="circle"> <li>CPU <li> INPUT DEVICES <li> OUTPUT DEVICES <li> HARD DISK <Li> FLOPPY DISK </ul></ul></body></html>

Nested list

<html> <head>nested list<title></title></head> <body> <p> <font color="red" size="7" face="verdana"><b><i><u>combination of ordered and unordered list.</u></i></b></font></p> <ul> <li><font color="blue" size="5" face= "algerian">SOFTWARE</font> <ol> <li><font color="red" size="3" face= "algerian">COMPUTER CONCEPTS</font> <li><font color="red" size="3" face= "algerian">MS WINDOWS</font> <li><font color="red" size="3" face= "algerian">MS EXCEL</font> <li><font color="red" size="3" face= "algerian">MS WORD</font> <li><font color="red" size="3" face= "algerian">FOXPRO</font> </ol> <li><font color="blue" size="5" face= "algerian">HARDWARE</font> <ol> <li><font color="red" size="3" face= "algerian">CPU</font> <li><font color="red" size="3" face= "algerian">INPUT DEVICES</font> <li><font color="red" size="3" face= "algerian">OUTPUT DEVICES</font> <li><font color="red" size="3" face= "algerian">HARD DISK</font> <li><font color="red" size="3" face= "algerian">FLOPPY DISK</font> </ol> </ul> </body> </html>

Use of image tag

<html> <body style="background-color:teal"> <h2 style="background-color:red">This is image tag</h2> <img src="file:///D:/backgrounds/Hardy_White_Water_Lillies.jpg" height="200" width="200"> </body> </html>

Linking documents in HTML


<html> <body style="background-color:yellow"> <h1 style="background-color:green">use of links.</h2> <a href="file://C:\Documents and Settings\Administrator\Desktop\image.html">image</a><br> <a href="file://C:\Documents and Settings\Administrator\Desktop\bgcolor.html">background color</a> </body> </html>

Use of table tag

<html> <body> <table border="5"> <tr><th>ITEM NO.<th>ITEM NAME<th>QUANTITY<th>COMPANY <tr><td>1.<td>Mouse<td>100<td>Microsoft <tr><td>2.<td>Monitor<td>50<td>Microsoft <tr><td>3.<td>Keyboard<td>50<td>Microsoft <tr><td>4.<td>Speaker<td>150<td>Microsoft </body> </html>

Column span and row span in tables

<html> <body> <h4>column span :</h4> <table border="5"> <tr> <th>Name</th> <th colspan="2">Information</th> </tr> <tr> <td>Rubal</td> <td>#412/2,Guru Nanak street, Patiala</td> <td>MBA</td> </tr> </table> <h4>row span :</h4> <table border="5"> <tr> <th>Name:</th> <td>Rubal</td> </tr> <tr> <th rowspan="2">Information</th> <td>#412/2,Guru Nanak street, Patiala</td> </tr> <tr> <td>MBA</td> </tr> </table> </body> </html>

Use of frame tag

<html> <frameset cols="55%,45%"> <frameset rows="60%,*"> <frame src="image.html"> <frame src="links.html"> </frameset> <frame src="table.html"> </frameset> </html>

Creating form using HTML


<html> <head> <body> <form> Student name:<input type="text" name="Student name" /><br /> roll no:&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<inpu t type="text" name="roll no." /><br /> Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" name="pwd" /><br /><input type="radio" name="sex" value="male" /> Male<br /> <input type="radio" name="sex" value="female" /> Female<br /> type of vehicle :-<br /> <input type="checkbox" name="vehicle" value="Bike" /> bike<br /> <input type="checkbox" name="vehicle" value="Car" /> car<br /> form no: <input type="text" name="user" /><br /> <input type="submit" value="Submit" /> </form> </body> </head> <html>

Vous aimerez peut-être aussi