GEEKSFORGEEKS DEFAULT TABLE USING HTML TABLE (TABLE HEADING AS WELL AS TABLE DATA) WITH MY OWN EXPLANATION ALONG WITH FULL CONCEPTS, CODE AND OUTPUT OF THE CODE

 GEEKSFORGEEKS DEFAULT TABLE USING HTML TABLE (TABLE HEADING AS WELL AS TABLE DATA) WITH MY OWN EXPLANATION ALONG WITH FULL CONCEPTS, CODE AND OUTPUT OF THE CODE

So normally I am going to explain about the code which I have used. Basically in my code I have used very basic simple things with we I or we can easily create a table using table heading, table data, trowspan and colspan. I hope everyone is aware of what is called table heading, table data, rowspan and colspan?
Basically table heading is the heading which we always provide and in html we can provide the table heading by using <th> tag.

So, in my code firstly I have taken one heading 1 where I have put the code of GeeksforGeeks and I have initialise that heading 1 with a class name modal-header for providing the css styling. Then I have taken another heading but this time I haven't take heading 1, this time I have taken little bit smaller heading than heading 1 that is heading 3 I have taken, and the class of heading 3 I have initialise as modal-header1 for providing the css styling. Then I have taken one table whose border I have taken as 3px to provide some border to my tabloe and then I have aligned the table to center of the page. After that within table one table row <tr> tag within this table row <tr> tag I have used bgcolor=grey for making my table heading background color as grey where I have taken 6 (six) table heading as <th> tag and then I have taken another table row <tr> tag where I have taken another 6 (six) table data for inputing my data in the table and I have used <br> tag for breaking which means to make it into the next line in the same row and in the same table data <td> tag I have used <br> tag. SO that within the same row and withing the same table data I can input multiple data by using <br> tag that is the break line or I can also say to make it to the next line.

CODE =>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Default Table</title>
    <style type="text/css">
        .modal-header
        {
            text-align: center;
            color: seagreen;
            font-weight: bolder;
        }
        .modal-header1
        {
            text-align: center;
        }
    </style>
</head>
<body>
    <h1 class="modal-header">GeeksforGeeks</h1>
    <h3 class="modal-header1">Default Table</h3>
    <table align="center" border="3px">
    <tr bgcolor="grey">
        <th>Rank</th>
        <th>Name</th>
        <th>Runs</th>
        <th>Centuries</th>
        <th>Strike Rate</th>
        <th>Avg</th>
    </tr>
    <tr>
        <td>1<br>2<br>3<br>4</td>
        <td>Rohit Sharma<br>Virat Kohli<br>K.L. Rahul<br>Rishabh Pant</td>
        <td>10000<br>12000<br>5000<br>4000</td>
        <td>29<br>40<br>8<br>2</td>
        <td>97<br>91<br>85<br>89</td>
        <td>55<br>49<br>45<br>39</td>
    </tr>
    </table>
</body>
</html>

OUTPUT OF THE CODE =>

GeeksforGeeks

RankNameRunsCenturiesStrike RateAvg
1
2
3
4
Rohit Sharma
Virat Kohli
K.L. Rahul
Rishabh Pant
10000
12000
5000
4000
29
40
8
2
97
91
85
89
55
49
45
39




Comments

Popular posts from this blog

Programmings Based On Array And String Functions To Merge The 2 Arrays, Then After Merge Convert Into String And Then Find Out The 1st And Last Word From The Reverse String

PHP WEB DEVELOPMENT INTERVIEW QUESTIONS ASKED IN APOLLO HOSPITAL ALONG WITH MY OWN CONCEPTS AND MY OWN EXPLANATION ANSWERS(PART - 1) REST OF THE QUESTIONS AND ANSWERS WILL BE PREPARED BY ME IN MY NEXT BLOG

Mini Project On Multi User CRUD Operations(Create, Read, Update & Delete) Of Donar Details Of Indian Nationals Who Donate To Ramkrishna Math, Belur Math Using PDO (PHP Data Objects) With Proper Explanation Of Each And Every Individual Line Of The Code Of connection.php Page, form.php Page, formaction.php Page, admin_display.php Page, client_display.php Page, edit.php Page, editaction.php Page And delet.php Page (Here You Will Find The Image Of Sayang Sri Ramkrishna Dev, Sayang Sri Ma Sarada Devi & Sayang Sri Swami Vivekananda) In My CRUD Operation