I haven't been able to understand the tables and links | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I haven't been able to understand the tables and links

Tables and it tags

22nd Dec 2022, 3:18 PM
Adepoju Amanda
Adepoju Amanda - avatar
5 Answers
+ 5
HTML tables are used to display tabular data in a web page. Tables are defined with the <table> tag in HTML. A table is divided into rows (with the <tr> tag), and each row is divided into cells (with the <td> or <th> tags). The <td> tag represents a standard cell in a table, while the <th> tag represents a cell that is a header for a column or row. Here is an example: <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>John</td> <td>30</td> </tr> <tr> <td>Jane</td> <td>25</td> </tr> </table>
22nd Dec 2022, 3:56 PM
Sadaam Linux
Sadaam Linux - avatar
+ 5
This would create a table with two columns (Name and Age) and two rows (one for John and one for Jane). The <th> tags define the table headers, while the <td> tags define the cells in the table. You can also use the <caption> tag to add a caption to the table, and the <col> and <colgroup> tags to apply styles to specific columns or groups of columns. Links, also known as hyperlinks, are used to navigate between web pages. They are created with the <a> tag in HTML, and the destination of the link is specified with the href attribute. For example: <a href="https://www.sololearn.com">Click here to visit Example.com</a> This would create a link that, when clicked, takes the user to the sololearn website. You can also use the <a> tag to create links to other parts of the same web page, or to download files.
22nd Dec 2022, 3:58 PM
Sadaam Linux
Sadaam Linux - avatar
+ 4
Why not try looking at some codes and try to write some yourself? If that doesn't help, have a search online.
22nd Dec 2022, 3:34 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
TABLES are for displaying data such as functions in relation to X and Y. <TABLE> tells HTML that we want to create a new table. <THEAD> is for displaying the label of data such as [Steps, distance Walked] this tag will also exist in the <TABLE> tag <TR> is a new line of columns that will display data this will existing just like the <THEAD> in the <TABLE> tag <TD> or <TH> is for columns that will contain the data that will exists within a <TR> tag <TFOOT> exists at the end of the table for example with Sums Example: <table> <thead> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tbody> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </tbody> <tfoot> <tr> <td>Sum</td> <td>$180</td> </tr> </tfoot> </table> LINKS is for directing users or importing resources <A> tag is used for redirecting users to a different websites if that is within the website or an external website and is used in the BODY of a HTML file <LINK> is used for importing resources for the website that can come from or externally the website such as CSS files and is used in the HEAD of a HTML file the Attribute HREF is used in both of these tags and the arguement within the HREF tag is the link of website/resources example <a href="https://www.google.com">Google</a> <link href="mycss.css"> The <A> tag has also the TARGET and DOWNLOAD attributes which is the most commonly used. The TARGET specifies where to open the linked document and the DOWNLOAD attribute downloads the document of the within the HREF tag
22nd Dec 2022, 3:40 PM
Vanessa Nilsson
0
Thanks a lot for the answers
22nd Dec 2022, 5:12 PM
Adepoju Amanda
Adepoju Amanda - avatar