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

HTML and JavaScript for Visual Learners- P16 ppt

5 170 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 136,25 KB

Nội dung

Download other Visibooks for free at www.visibooks.com 7 0 8. To bring the left-hand cells content to the top of the cell, add the attribute VALIGN=”top” to the first <TD> tag. (To cover all bases, add the attribute to the second <TD> tag as well): <TABLE BORDER=”0” WIDTH=”100%” CELLPADDING=”16” CELLSPACING=”0”> <TR> <TD BGCOLOR=”#CCCCCC” VALIGN=”top”> <FONT FACE="arial" SIZE=”-1”> Richmond <P> Williamsburg <P> Charleston </FONT> </TD> <TD VALIGN=”top”> <FONT FACE="verdana" SIZE=”+3”><B>Traveling South</B></FONT> <P> <IMG SRC="graphics/uva.gif"> <P> <FONT FACE="arial" SIZE=”-1”>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.</FONT> </TD> </TR> </TABLE> Download other Visibooks for free at www.visibooks.com 71 9. To control the widths of the table cells, add the attribute WIDTH=”20%” to the first <TD> tag, and the attribute WIDTH=”80%” to the second: <TABLE BORDER=”0” WIDTH=”100%” CELLPADDING=”16” CELLSPACING=”0”> <TR> <TD BGCOLOR=”#CCCCCC” VALIGN=”top”> <FONT FACE="arial" SIZE=”-1” WIDTH=”20%”> Richmond <P> Williamsburg <P> Charleston </FONT> </TD> <TD VALIGN=”top” WIDTH=”80%”> <FONT FACE="verdana" SIZE=”+3”><B>Traveling South</B></FONT> <P> <IMG SRC="graphics/uva.gif"> <P> <FONT FACE="arial" SIZE=”-1”>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.</FONT> </TD> </TR> </TABLE> Download other Visibooks for free at www.visibooks.com 7 2 10. Save the page and view it in the browser. It should now look like this: Download other Visibooks for free at www.visibooks.com 73 Create new table-based pages 1. On the Notepad menu bar, click Edit , then Select All . 2. Once all the code on the page is selected, click Edit , then Copy . 3. On the menu bar, click File , then New . 4. When a new blank page comes up, click Edit , then Paste . Download other Visibooks for free at www.visibooks.com 7 4 5. Save the new page at C:\Travel with the file name richmond.html . 6. Title the new page “Richmond, VA.” 7. Open a browser and go to www.visibooks.com/travelpic/richpic . Capture the Richmond, Virginia graphic there ( capitol.jpg ) and place it in the graphics folder. 8. Replace the “Traveling South” heading with one that reads “Richmond, Virginia.” Give it a size of +2. 9. Replace the home page graphic with the Richmond graphic. Beneath the graphic, in a new paragraph, type the sentence, “Richmond is the capital of Virginia.” 10. Add the word  Home  below the words in the left-hand cell. When youre done, the page should look like this: . Download other Visibooks for free at www.visibooks.com 7 2 10. Save the page and view it in the browser. It should now look like this: Download other Visibooks for free at www.visibooks.com. Visibooks for free at www.visibooks.com 7 4 5. Save the new page at C:Travel with the file name richmond .html . 6. Title the new page “Richmond, VA.” 7. Open a browser and go to. Download other Visibooks for free at www.visibooks.com 71 9. To control the widths of the table cells, add the attribute WIDTH=”20%” to the first <TD> tag, and the attribute WIDTH=”80%”

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