HTML Assignment

1. Explain the Table and its properties.

HTML tables allow web authors to organize data into rows and columns of cells.

Here are some properties of HTML tables:

  • Table: Defines the overall table

  • Table Row (TR): Used to build each row

  • Table Data (TD): Defines the actual data

  • THEAD: Defines the head

  • TFOOT: Defines the foot

  • TBODY: Defines the body

To create an HTML table, you can use the following tags:

  • <table>: Creates an HTML table

  • <tr>: Creates table rows

  • <td>: Creates data cells

  • <th>: Defines a table heading

2.explain all media elements and how they work?

HTML5 introduced 5 most popular media element tags i.e. <audio>, <video>, <source>, <embed>, <track>. These media element tags changed the entire development using HTML.

In this article, you will get to know about these five media element tags briefly.

Media Tags:

  • <audio>: It is an inline element that is used to embed sound files into a web page.

  • <video>: It is used to embed video files into a web page.

  • <source>: It is used to attach multimedia files like audio, video, and pictures.

  • <embed\>: It is used for embedding external applications which are generally multimedia content like audio or video into an HTML document.

  • <track>: It specifies text tracks for media components audio and video.

Advantage of Media tag:

  • Plugins are no longer required

  • Speed – anything naturally integrated into a browser will be rendered and executed in a faster fashion than imported third-party

  • Native (built-in) controls are provided by the browser.

  • Accessibilities (keyboard, mouse) are built-in automatically

<audio> Tag: It is a useful tag if you want to add audio such as songs, or any sound files into your webpage.

Syntax:

<audio>
    <source src="sample.mp3" type="audio/mpeg">
</audio>

3.What s Get and Post n Form?

In HTML forms, the POST method sends information to the server, while the GET method retrieves form information from the server.

Here are some more details about the POST and GET methods:

  • POST

    Sends data to a server to update a resource. It's often used to send user-generated data or an uploaded file to the web server. POST is safer than GET because the parameters are not stored in web server logs or the browser history.

  • GET

    Requests data from a specified resource. It's preferable for images, word documents, or data that doesn't require security. GET is less secure than POST because the URL contains part of the data sent.

4.list all the input types we have in forms?

Here are some input types in forms:

  • Checkbox: A square box that can be checked or unchecked to select options from a given list. Multiple checkboxes in a form can have the same control name, allowing users to select multiple values for the same property.

  • Radio buttons: Similar to checkboxes, but radio buttons are for a set of items where only one can be selected. Different sets of radio buttons can be differentiated by giving them matching name attributes.

  • Text input: The default type in input forms, although it is recommended to supply it explicitly.

  • Textarea: A form control element that defines form, name, type, and value properties.

  • Input type=email: Creates an input field that allows the user to input a valid email address.

  • Fieldset: Allows authors to group thematically related controls and labels.

  • Tel: Lets you collect telephone numbers from users.