Tables and Frames in HTML

  • Post author:

In this third article we’ll learn about Tables and Frames in HTML

In HTML, you can create tables for your website using the <table> tag in conjunction with the <tr>, <td> and <th> tags.

The HTML tables allow displaying the data (e.g. image, text, and link) in columns and rows of cells. Table rows can be grouped into a head, foot, and body sections through the <thead>, <tfoot> and <tbody> elements, respectively.

The <iframe> tag creates an inline frame for embedding third-party content (media, applets, etc.).

The <iframe> tag comes in pairs. The content is written between the opening (<iframe>) and closing (</iframe>) tags.

Write the code to get similar output

output

Source Code: For Tables and Frames

<!DOCTYPE html>

<html>

                <head>

      <title>16 Akash Jha</title>

      <style>th, td {

         padding: 10px;

         font-size: 18px;

       }

       </style>

                </head>

                <body style=”background-color: grey”>

<h2> HTML Table</h2>

<table bgcolor=”green” style=”border-color: yellow;”  border=”10px” style=”width:100%”>

   <caption ><b><i>Table 1. Favorite Subjects</i></b></caption>

  <tr>

    <th>Firstname</th>

    <th>Roll no & Class</th>

                <th>Fav. Sub in sem <sup>(1)</sup></th>

                <th>Fav. Sub in sem  <sup>(2)</sup></th>

                <th>Fav. Sub in sem  <sup>(3)</sup></th>

                <th>Fav. Sub in sem  <sup>(4)</sup></th>

                <th>Fav. Sub in sem  <sup>(5)</sup></th>

  </tr>

  <tr align=”center”>

    <td>Akash Jha</td>

    <td>16 TE E&TC B</td>

                <td rowspan=”2″>AP-I</td>

                <td rowspan=”2″>AM-II</td>

                <td rowspan=”2″>DLD</td>

                <td rowspan=”2″>Value Edu</td>

                <td rowspan=”2″>PS5</td>

  </tr>

  <tr>

    <td>Sky</td>

    <td>99 TE E&TC B</td></tr>

  <tr>

                <th colspan=”2″>Marks<sub>(Out of 20)</sub></th>

                <th>16</th>

                <th>17</th>

                <th>18</th>

                <th><mark>20</mark></th>

                <th><mark>20</mark></th>

  </tr>

</table><br>

<h2>Basic HTML IFrame</h2>

<iframe src= “https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRr5kve8uJvA1JcDmKbSh1a_JFvLt5tUI8n2A&usqp=CAU” height=”160″ width=”280″ title=”IFrame”></iframe>

</body>

                </html>

I hope you liked the content of Tables and Frames in HTML

Follow Me On Instagram : the_aakash_sky

Also Read: How to Write Abstract in Research Paper

Read Our Technical Research Papers Click Me

Basics of HTML part 2: Click Here

Also Read: 5 TECH MYTH BUSTER PART 2

This Post Has 2 Comments

Leave a Reply