QUESTION NO 1:- Create an HTML code to create the user registration form with following
details user name, user DOB, user email, user contact no, user address, gender.
CODE:-
<html>
<head>
<title>Registration Page</title>
</head>
<body>
<center>
<h3>REGISTRATION FORM<h3>
<form>
<fieldset style="padding: 10px; border: 6px solid black; background: orange;">
<label>ENTER YOUR FULL NAME</label><br>
<input type="text" name="name"><br><br>
<label>ENTER YOUR D.O.B</label><br>
<input type="date" name="date" ><br><br>
<label>ENTER YOUR CONTACT NO.</label><br>
<input type="mobile" name="contact"><br><br>
<label>ENTER YOUR EMAIL</label><br>
<input type="email" name="email"><br><br>
<label> ENTER YOUR GENDER</label><br>
<input type="radio" id="gender" name="gender" value="male"/>Male<br>
<input type="radio" id="gender" name="gender" value="female"/>Female<br>
<input type="radio" id="gender" name="gender" value="other"/>Others<br><br>
<label>CREATE YOUR PASSWORD</label><br>
<input type="password" name="pass"><br><br>
<label>CONFIRM YOUR PASSWORD</label><br>
<input type="password" name="pass"><br><br>
<label>ENTER YOUR ADDRESS</label><br>
<textarea></textarea><br><br>
<input type="submit" value="Sign-up">
</fieldset>
</form>
</center>
</body>
</html>
OUTPUT:-
Question no 2:- Difference between XML and HTML.
XML and HTML
XML HTML
• The full form is extensible • The full form is Hypertext Markup
Markup Language. Language.
• The main purpose is to focus on • Focusses on the appearance of data.
the transport of data and saving Enhances the appearance of text.
the data.
• It is case-sensitive. The upper • It is not case-sensitive. Upper and
and lower case needs to be kept lower case are of not much
in mind while coding. importance in HTML.
• XML can preserve white spaces. • White spaces are not preserved in
HTML
• XML is dynamic because it is • HTML is static because its main
used in the transport of data. function is in the display of data.
QUESTION 3:- Explain HTML Tags and their attributes.
(1). List (2). Table
Ans:-
LIST:- HTML lists allow web developers to group a set of related items in lists.
Ordered List
1. Ordered list start with <ol> tag and ends with </ol>.
2. All the items in this list are enclosed in <li> and </li> tags.
3. By default items in this list will get numbers as a markers.
4. We can change markers using attributes.
Unordered List
1. Unordered list start with <ul> tag and ends with </ul>.
2. All the items in this list are enclosed in <li> and </li> tags.
3. By default items in this list will get filled circle as a bullets.
4. We can change bullets using attributes.
Description List
1. HTML also supports description list.
2. It is a list of some phrase(term) and description of the phrase.
3. It has 3 tags
<dl> — For Creating list
<dt> — For Term
<dd> — For Description
Ordered List attributes
Type attribute:-
By default ordered list will mark each item with number. We can change this mark by using “type”
attribute.
Start Attribute :-
We can also set start mark from which we have to start our list. We have to use “start” attribute.
Reversed Attribute :-
We can display list in reverse order or descending order for this we have to add “reversed” attribute.
UNORDERED LIST ATTRIBUTES:-
Type attribute :-
If we want to change default bullet marker with other shapes like : square, disc and circle.
Style Attribute :-
We can also change bullets using “style” attribute. We can set following values in “style” attribute:
(2). Table:-
An HTML table consists of one <table> element and one or more <tr>, <th>, and <td> elements.
We can create a table to display data in tabular form, using <table> element, with the
help of <tr> , <td>, and <th> elements.
HTML Table Tags
Tag Description
<table> It defines a table.
<tr> It defines a row in a table.
<th> It defines a header cell in a table.
<td> It defines a cell in a table.
<caption> It defines the table caption.
<colgroup> It specifies a group of one or more columns in a table for formatting.
<col> It’s used with <colgroup> element to specify column properties for each column.
<tbody> It is used to group the body content in a table.
<thead> It is used to group the header content in a table.
<tfooter> It is used to group the footer content in a table.
Table tag attributes:-
Tags Definition
<caption> … </caption> Used to write a caption.
<table align= “center”> … <table> Used aligning table to center
<table border= “”> ... </table> Used to get border to table
<table colspan or rowspan= “”> … Used for rowspan or colspan in
</table> table
<table bgcolor= “”> ... </table> Used to get bgcolor to cell in table
<table cellpadding= “”> … </table> Used to get Cell Spacing in table
<table cellspacing= “”> … </table> Used to get Cell Padding in table