1. Trang chủ
  2. » Công Nghệ Thông Tin

HTML and JavaScript for Visual Learners- P15 docx

5 266 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 175,37 KB

Nội dung

Download other Visibooks for free at www.visibooks.com 65 3. Remove the table border by specifying BORDER=”0” : <BODY> <TABLE BORDER=”0” WIDTH=”100%”> <TR> <TD>Links</TD> <TD>Content</TD> </TR> </TABLE> 4. Make the first cell light grey by adding the attribute BGOLOR=”#CCCCCC” to the first <TD> tag: <BODY> <TABLE BORDER=”0” WIDTH=”100%”> <TR> <TD BGCOLOR=”#CCCCCC”>Links</TD> <TD>Content</TD> </TR> </TABLE> 5. Save the page and view it in the browser. It should look like this: Download other Visibooks for free at www.visibooks.com 66 6. Youll notice that the word Links is right up against the edge of the left-hand cell. To add a 16-pixel margin between the edge of the cells and their contents, add the attribute CELLPADDING=”16” to the <TABLE> tag: <BODY> <TABLE BORDER=”0” WIDTH=”100%” CELLPADDING=”16”> <TR> <TD BGCOLOR=”#CCCCCC”>Links</TD> <TD>Content</TD> </TR> </TABLE> 7. To eliminate the spacing between cells, add the attribute CELLSPACING=”0” to the <TABLE> tag: <BODY> <TABLE BORDER=”0” WIDTH=”100%” CELLPADDING=”16” CELLSPACING=”0”> <TR> <TD BGCOLOR=”#CCCCCC”>Links</TD> <TD>Content</TD> </TR> </TABLE> 8. Save the page and view it in the browser. It should look like this: Cell Padding creates a cushion of pixels between the edge of the cell and whats inside it. Cell Spacing is the space between cells. In this case, 0 pixels Download other Visibooks for free at www.visibooks.com 67 Create a table-based home page 1. Create a folder called  graphics  inside the Travel folder on your hard drive. 2. Go to www.visibooks.com/travelpic . Capture the graphic there ( uva.gif ) and save it in the graphics folder. 3. In the right-hand cell on the home page, replace the word Content with the heading  Traveling South. Give the heading a size of +3, put it in the Verdana font, and make it bold. 4. Insert the graphic in a new paragraph beneath the heading. 5. Under the graphic, add the following sentences as a new paragraph: If you've got a couple of weeks for vacation, you might want to visit the South. Richmond, Williamsburg, and Charleston are all beautiful cities. Make the text arial, size -1. Download other Visibooks for free at www.visibooks.com 68 6. In the left-hand cell, replace the word Links with the names of this sites main sections: Richmond , Williamsburg and Charleston . Separate them with <P> tags and put them in the arial font, at size -1. The code for the page can look like this: Download other Visibooks for free at www.visibooks.com 69 7. Save the page and view it in the browser. It should look like this: . weeks for vacation, you might want to visit the South. Richmond, Williamsburg, and Charleston are all beautiful cities. Make the text arial, size -1. Download other Visibooks for free. In the left-hand cell, replace the word Links with the names of this sites main sections: Richmond , Williamsburg and Charleston . Separate them with <P> tags and put them in. arial font, at size -1. The code for the page can look like this: Download other Visibooks for free at www.visibooks.com 69 7. Save the page and view it in the browser. It should

Ngày đăng: 03/07/2014, 10:20