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