Computer Applications
Write the HTML code to:
i. Align the content of a cell in a Table to the top
ii. Link to a specific section of another webpage
HTML Advanced Features
25 Likes
Answer
i. To align the content of a cell in an HTML table to the top, we can use the 'valign' attribute with the value "top" for the <td>
element. Consider the given example,
<TABLE>
<TR>
<TD VALIGN = "TOP"> Mouse </TD>
<TD>Monitor </TD>
</TR>
<TR>
<TD>Keyboard </TD>
<TD>Printer </TD>
</TR>
</TABLE>
ii. To create a link to a specific section of another webpage, we can use anchor tags <a>
with the 'href' attribute pointing to the target webpage and specifying the target section using a '#' followed by the section's 'name' attribute. Consider the given example,
<a href="https://computerhardware.com#inputdevices">Input Devices</a>
Here, "inputdevices" is the value of the 'name' attribute which refers to a specific section of another webpage.
Answered By
8 Likes
Related Questions
How is spacing in cells controlled?
How will you add an image of a table at the top of your web page?
Write the HTML code to send an email to
abc@xyz.com
from your web page.Create a table having four header rows with yellow background colour, four table body rows having light orange colour, and two footer rows having light green colour. Add table contents on your own.