0
4.2kviews
Explain following HTML tags : i) <form> ii) <table> iii) <iframe> iv) <doctype>
1 Answer
written 6.3 years ago by |
<form>
Tag<form>
tag is to allow the user to enter data on one side and then send this data on other side through web server.<form>
and closing </form>
<form>
tag represents the HTTP method that sends the data to the action URL. The default value for the method attribute is get.<form>
element can contain one or more of the following form elements: <input>, <textarea>, <button>, <select>, <option>, <optgroup>, <fieldset>, <label>
Example:
<form action=" " method="get">
First name: <input type="text" name="fname"><br><br>
Last name: <input type="text" name="lname"><br><br>
<input type="submit" value="Submit">
</form>
Output:
<table>
Tag<table>
tag is used to create a table. This tag useful to display information in more than one dimension means in tabular format.<table>
and closing </table>
are as follow<th>
- To create header cell in a table<tr>
- To create rows in a table<td>
- To create cell in a table<caption>
- Specifies the caption of table<colgroup>
- Specifies a group of one or more columns in table<col>
- Specifies column properties for each column within a <colgroup>
<thead>
- Groups the header content in a table<tbody>
- Groups the body content in a table<tfoot>
- Groups the footer content in tableExample:
<table border=”3”>
<tr><th>Month</th><th>Balance</th> </tr>
<tr><td>January</td><td>10000</td> </tr>
<tr> <td>February</td> <td>20000</td></tr>
</table>
Output:
<iframe>
Tag<iframe>
tag specifies an inline frame.<iframe>
tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders.<iframe>
tag is not somehow related to <frameset>
tag, instead, it can appear anywhere in the document.<iframe src="https://www.ques10.com"></iframe>
<doctype>
Tag<!DOCTYPE>
declaration must be the very first thing in the HTML document, before the <html>
tag.<!DOCTYPE>
declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.<!DOCTYPE>
declaration. <!DOCTYPE>
declaration.<!DOCTYPE>
does not have a closing tag.