HTML table is an element comprised of table rows and columns like part of a spreadsheet. They are container elements holding HTML elements in a tabular fashion, row by row. HTML tables are only used to display tabular information but may also sometimes help is setting up the layout of a page.
A example of a table may be the following:
|Header 1||Header 2|
|row 1, cell 1||row 1, cell 2|
|row 2, cell 1||row 2, cell 2|
Important aspects of HTML table:
- Table are defined within the <table> tag
- Table rows are defined within the <tr> tag(table row)
- <tr> may contain <td>(table data) or <th>(table header)
- A Cell may span on several rows by setting the rowspan attribute
- A Cell may span on several columns by setting the colspan attribute
For more information, refer to W3C documentation for table.
Hyperlinks are how we move around on the web. In HTML, hyperlinks can be created using the <a> tag. The <a> tag can take several attributes among which
href is the most important. Suppose, we want to create a link to the homepage of knowledge7.
<a href=”https://www.knowledge7.com”> Knowledge7</a>
will look like Knowledge7 when rendered on a browser.
Hyperlinks can be used to link to local web pages, external web pages or section within a page. An <a> tag can be in several states namely:
- Link: The link has not yet been clicked
- Active: The state which it being clicked and not yet released by the user
- Visited: The state after it has already been visited
- Hover: The state when the user’s cursor in on it
Check the latest rules set by W3C about anchors here
Leave a Reply