Write the HTML commands for the following.
(a) To create a table with four pixels thick border of blue colour
(b) To create a table with background colour as yellow
(c) To set the background colour of a row as yellow
(d) To centre align the contents of a cell
(e) To set the image 'flower.jpg' as a hyperlink to the file 'Garden.html'
Answers
HTML COMMANDS FOR THE FOLLOWING ARE
Explanation:
(a) For creating a table with four pixels thick border of blue color:
< TABLE BORDER = "4" BORDERCOLOR = "blue" >
(b) Now, creating a table with background color as yellow:
<table style="width:100%;text-align: left; background-color: yellow;">
//now you can create here table and enter your cell whose background color will ne yellow
</table>
(c) To set the background color of a row as yellow:
row background colors are to be set by applying the bgcolor attribute to a <tr> tag (to color the row)
<tr bgcolor="yellow">
</tr>
(d)For the aligning of the contents of a cell to centre:
Use the CSS property text-align. use CSS to align text in table cells.
property can be applied inside the CSS as:
text-align: centre:
not this property can be utilized by giving table a class or id and acessing it through that class or id.
(e)To set the image as 'flower.jpg' as the hyperlink to the file 'Garden.html' :
use the href attribute .
<a href="../Garden.html"><img src="flower.jpg" width="82" height="86" title="White flower" alt="Flower"></a>
Answer:
to connect the text contact us to the email address [email protected]