0% found this document useful (0 votes)
90 views3 pages

HTML Tables and Forms Guide

The document discusses HTML tables and forms. It contains questions and answers about the structure of tables, use of caption, rowspan and colspan attributes, cellpadding and cellspacing. It also discusses different form elements like text, email, number, password, radio buttons, checkboxes, submit and reset buttons.

Uploaded by

subodhbhatt80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views3 pages

HTML Tables and Forms Guide

The document discusses HTML tables and forms. It contains questions and answers about the structure of tables, use of caption, rowspan and colspan attributes, cellpadding and cellspacing. It also discusses different form elements like text, email, number, password, radio buttons, checkboxes, submit and reset buttons.

Uploaded by

subodhbhatt80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Apeejay Svran Global School, Faridabad

Class-8
Ch-HTML Tables

Q1. What is the structure of tables in HTML?


Ans. The general structure of table in HTML is:
<table>
<tr>
<th>Data item1</th>
<th>Data item2</th>
</tr>
<tr>
<td>Data item1</td>
<td>Data item2</td>
</tr>
</table>
Q2. What is the use of Caption?
Ans. <caption> tag is used inside the <table>tag to show table
caption.By default table caption is displayed horizontally centred at top
of the table.
Q3. What is the difference between ROWSPAN and COLSPAN?
Ans.Rowspan attribute is used to merge two or more cells vertically
across the table rows to from single cell whereas Colspan is used to
merge two or more cells horizontally across the table columns to form
single cell.
Q4. Describe the use of CELLPADDING and CELLSPACING attributes.
Ans. CELLPADDING is the table attributes used to set the distance
between the edges and contents of the table cell.
CELLSPACING is the table attribute which sets the distance between
the consecutive cells.
Q5. What are <th> and <tr> tags used for?
Ans. To display a group of data in a tabular form the HTML table tag is
used. To serve this purpose the HTML <table> element is used, with
<tr> tag to define the table row, <th> tag to define the table header and
the <td> tag to define the table data.
Ch-HTML Forms
Q1. What do you understand by HTML forms and how do they work?
Ans. An HTML Form is a section of the document that collects input
from the user. The input from the user is generally sent to a server
(Web servers, Mail clients, etc). We use the HTML element to create
forms in HTML.
Q2.Differentiate between Check Boxes and Radio Buttons?
Ans:

Radio button Checkbox

It is used when only one option to be


Checkbox allows one or many options
selected out of several available
to be selected.
options.

It is also created using HTML <input>


It is created by using HTML <input>
tag but type attribute is set to
tag but type attribute is set to radio.
checkbox.

It is a single control unit. It is a multiple control unit.

Radio button is presented as a small Checkbox is presented as a small


circle on the screen. square box on the screen.

Q3. Differentiate between Submit Button and Reset Button.


Ans. There is two different kinds of buttons – the submit button and
the reset button. The submit button is used whenever you want to
submit a form and the markup looks like this: <input type="submit"
value="Submit now" /> The reset button is used to clear al inputs by the
user and the markup looks like this: <input type="reset" value="Reset"
/>.
Q4. Define Text area with its utility.
Ans. The <textarea> element is often used in a form, to collect user
inputs like comments or reviews. A text area can hold an unlimited
number of characters.
Q5. Explain the attribute with their arguments associated with
<input>tag.
Ans.

Attributes Descriptions

It is used to specify the type of the


type
input element. Its default value is text.

It is used to specify the value of the


value
input element.

It is used to specify the name of the


name
input element.

Elements of HTML Forms:


Forms can be made up of standard graphical user interface elements:

 <text> — a simple text box that allows input of a single line of text.
 <email> – a type of <text> that requires a partially validated email address
 <number> – a type of <text> that requires a number
 <password> – similar to <text>, it is used for security purposes, in which the
characters typed in are invisible or replaced by symbols
 <radio> — a radio button is used ti insert radio button in form, user can
select only one from given options.
 <file> — a file select control for uploading a file
 <reset> — a reset button that, when activated, tells the browser to restore
the values to their initial values.
 <submit> — a button that tells the browser to take action on the form
(typically to send it to a server)
 <textarea> — much like the <text> input field except a <textarea> allows for
multiple rows of data to be shown and entered
 <select> — a drop-down list that displays a list of items a user can select
from

You might also like