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 =>
OUTPUT OF THE CODE =>
GeeksforGeeks
Default Table
| Rank | Name | Runs | Centuries | Strike Rate | Avg |
|---|---|---|---|---|---|
| 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
Post a Comment