0
4.0kviews
Explain HTML tags

Explain following HTML tags

i)

<form>

ii)

<table>

iii)

<iframe>

iv)

<doctype>

Mumbai University > Information Technology > Sem 4 > Web Programming

Marks: 10M

Year: Dec 2014

1 Answer
0
36views

a) <form>

  • <form> tag is used to create HTML form for user input
  • HTML form has various elements like inputbox,buttons,etc.
  • For example:

    <form>
    Name: <input type="text" name="studentname" required><br>
    <input type="submit" value="Submit">
    
  • The above code creates a form with text box and button.

b) <table>

  • This tag is used to create table on a web page.
  • This tag consists of sub elements to define the structure of table.

    <tr> tag is used to define new row

    <th> tag is used to define table header

    <td> tag is used to define table data

  • <table> tag has various attributes to represent a table in a better way like align, - For example

    <table>
    <tr>
    <th>Subjects of IT Sem IV</th>
    <td>Applied Mathematics</td>
    <td>Web Programming</td>
    <td>Automata Theory</td>
    <td>Computer Organization and Architecture</td>
    <td>Information Theory and Coding</td>
    <td>Computer Networks</td>
    </tr>
    </table>
    

c) <iframe>

  • The HTML iframe element inserts a frame inside a document.
  • This frame works almost exactly as the HTML frame element, except that the last can only be inserted in a frameset (HTML frameset element).
  • This is useful for displaying a document in a portion of another document.
  • The document displayed inside this inline frame, is specified in the "src" attribute.
  • In XHTML 1.0 the "name" attribute for this element has been deprecated in favor of the "id" attribute.
  • On the other hand, the "align" attribute was deprecated in HTML 4.01. Therefore, their use is no longer recommended.

    Example:

    <iframe src="https://kt280.com " frameborder="1" width="100%" height="200">
    

    If you see this message, it means that your browser doesn't support frames or they are disabled. You can access the information shown in this frame here:

    <a href=" https://kt280.com ">Engineering Solutions</a>
    </iframe>
    

d) <doctype>

  • The <doctype> tag specifies the document type.
  • The document type is specified by the Document Type Definition (DTD).
  • The HTML syntax rules are specified by the file xhtml.dtd file.
  • Hence, it is mandatory to specify the name of the file as the beginning.
  • There are 3 types of HTML DTDs and those along with their uses are:

    HTML 1.0 Strict: This is used when we need a clean markup code.

    HTML 1.0 Traditional: This is used when we want to use HTML features in existing documents

    HTML 1.0 Frameset: This is used when we want frames in HTML document.

    For example:

     <!DOCTYPE html  PUBLIC “-//W3C//DTD XHTML 1.0 Traditional//EN”
     “html://www.w3.org/TR/xhtml/DTD/xhtml.1dtd”>
    
Please log in to add an answer.