Example 1: Create the structure of web page save it as home.html
Save: home.html
<html> <head> <title></title> </head> <body> </body> </html>
Example 2: Create web page with background color "yellow"
Save: bg.html
<html> <head> <title></title> </head> <body bgcolor="yellow"> </body> </html>
Example 3: Create web page and write your name in bold, italic and underline
Save: style.html
<html> <head> <title></title> </head> <body> <b> <i> <u> Ram </u> </i> </b> </body> </html>
Example 4: Write your name in font size 7, color red and face arial
Save: font.html
<html> <head> <title></title> </head> <body> <font size="7" color="red" face="arial"> Ram </font> </body> </html>
Example 5:
Write math and chemical formula x2, H2O
<html> <head> <title></title> </head> <body> x<sup>2</sup> <hr> H<sub>2</sub>O </body> </html>
Example 6:
Write your 2 friends name with break row tag.
<html> <head> <title></title> </head> <body> Ram <br> Krishna <br> </body> </html>
Example 7:
Write your school/college name and address with horizontal tag.
<html> <head> <title></title> </head> <body> CT COMPUTER ALMORA <hr> Near Forest Office Mall Road Almora </body> </html>
Example 8:
Write about your company name using paragraph tag.
<html> <head> <title></title> </head> <body> <p> Capscom technology is awarded for Best computer education for programming & software development in almora uttarakhand india at holiday Inn International airport Mumbai. </p> </body> </html>
Example 9:
Write your favourite fruits name in order list
<html> <head> <title></title> </head> <body> <ol> <li>Apple</li> <li>Grapes</li> <li>Banana</li> </ol> </body> </html>
Example 10:
Write your favourite subjects name in unorder list
<html> <head> <title></title> </head> <body> <ul> <li>Hindi</li> <li>Computer</li> <li>Math</li> </ul> </body> </html>
Example 11: Insert new image in web page
Note:
1. copy and paste one image in desktop (pic.jpg)
2. create new web page with name gallery.html
3. display an image on the page
<html> <head> <title></title> </head> <body> <img src="pic.jpg" width="25%" height="300" /> </body> </html>
Example 12: Create a link between two pages.
Note:
1. create one page with name home.html in desktop with background color yellow
2. create second page with name about.html in desktop with background color pink
3. now open home.html and add this code
<html> <head> <title></title> </head> <body> <a href="about.html">Go to about page</a> </body> </html>
Example 13: Create this school table
<html> <head> <title></title> </head> <body> <center> <table width="100%" border="1"> <tr> <th>Student Name</th> <th>Date of birth</th> <th>Mobile</th> </tr> <tr> <td>Ram</td> <td>11-12-2000</td> <td>7579237515</td> </tr> <tr> <td>Krishna</td> <td>11-12-2001</td> <td>7579237515</td> </tr> </table> </center> </body> </html>
Example 14: Create this basic form
<html> <head> <title></title> </head> <body> <fieldset> <legend>Admission form</legend> <form> <p> <label for="name">Name of student</label> <input type="text"> </p> <p> <label for="address">Address</label> <textarea></textarea> </p> <p> <label for="gender">Gender</label> <input type="radio" name="gender" value="Male">Male <input type="radio" name="gender" value="Female">Female </p> <p> <label for="hobby">Hobby</label> <input type="checkbox" name="hobby" value="Reading">Reading <input type="checkbox" name="hobby" value="Singing">Singing </p> <p> <label for="school">School</label> <select> <option>AIC</option> <option>GIC</option> <option>GGIC</option> </select> </p> <p> <label for="file">Image</label> <input type="file"> </p> <p> <label for="dob">Date of birth</label> <input type="date"> </p> <p> <input type="submit" name="register" value="Register"> </p> </form> </fieldset> </body> </html>