giáo trình HTML5 và CSS3 từng bước phần 6
Số trang: 33
Loại file: pdf
Dung lượng: 1.97 MB
Lượt xem: 12
Lượt tải: 0
Xem trước 4 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu giáo trình html5 và css3 từng bước phần 6, công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
giáo trình HTML5 và CSS3 từng bước phần 6 221 Merging Table CellsIt also comes in very handy when creating table-based page layouts, which you’ll learnabout on page 224 .To merge a cell into adjacent cells to its right, use the colspan attribute and specify thenumber of columns to be spanned, like this:To merge a cell into adjacent cells below it, use the rowspan attribute and specify thenumber of rows to be spanned, as shown in the following:Using those two attributes, you can create sophisticated table layouts . For example,the following table has five columns and five rows, but some of the cells span multiplecolumns or rows: Survey Results Age 12 to 25 26 to 40 Over 40 What is your dream vacation destination? Disneyworld 25% 50% 25% Las Vegas 25% 50% 25% Europe 25% 50% 25% 222 Chapter 12 The preceding code creates a table that appears as follows: In this exercise, you will create two simple column spans . SET UP Be sure to use the practice files provided specifically for this exercise, and not earlier versions. Use the products.htm file in the practice file folder for this topic. This file is located in the DocumentsMicrosoft PressHTML5 SBS12TablesSpanningCells folder. Open the products file in Notepad and in Internet Explorer. 1. View products.htm in Internet Explorer . Notice that the table title wraps to multiple lines, and that the note at the bottom of the table does not span all columns . 223 Merging Table Cells 2. In Notepad, modify the table title to span all four columns . Product Listing (Partial) 3. In the last row of the table, move the cell containing the note to the first position . Note: In-stock items are available for pick-up or delivery. Please visit our store for special sale prices on some items. Note Step 3 is necessary because columns can be spanned only from left to right.Download from Wow! eBook 4. Format the note to span all four columns . Note: In-stock items are available for pick- up or delivery. Please visit our store for special sale prices on some items. 5. Save the file, and then refresh Internet Explorer .224 Chapter 12 CLEAN UP Close the Notepad and Internet Explorer windows.Using Tables for Page Layout In addition to their value in laying out tabular data, tables are also useful in HTML for their page-structuring capabilities . It is customary for a Web page to have a navigation bar at the top or on the left side . It is fairly easy to create a horizontal navigation bar with regular paragraphs, as you saw in Chapter 10, “Creating Navigational Aids,” but to create a vertical navigation bar, you must somehow break the page into sections . One way to do that is by using divisions, as you learned in Chapter 11 . Another way is to use a table . 225 Using Tables for Page LayoutWhen using a table for page layout, you might place your navigation hyperli ...
Nội dung trích xuất từ tài liệu:
giáo trình HTML5 và CSS3 từng bước phần 6 221 Merging Table CellsIt also comes in very handy when creating table-based page layouts, which you’ll learnabout on page 224 .To merge a cell into adjacent cells to its right, use the colspan attribute and specify thenumber of columns to be spanned, like this:To merge a cell into adjacent cells below it, use the rowspan attribute and specify thenumber of rows to be spanned, as shown in the following:Using those two attributes, you can create sophisticated table layouts . For example,the following table has five columns and five rows, but some of the cells span multiplecolumns or rows: Survey Results Age 12 to 25 26 to 40 Over 40 What is your dream vacation destination? Disneyworld 25% 50% 25% Las Vegas 25% 50% 25% Europe 25% 50% 25% 222 Chapter 12 The preceding code creates a table that appears as follows: In this exercise, you will create two simple column spans . SET UP Be sure to use the practice files provided specifically for this exercise, and not earlier versions. Use the products.htm file in the practice file folder for this topic. This file is located in the DocumentsMicrosoft PressHTML5 SBS12TablesSpanningCells folder. Open the products file in Notepad and in Internet Explorer. 1. View products.htm in Internet Explorer . Notice that the table title wraps to multiple lines, and that the note at the bottom of the table does not span all columns . 223 Merging Table Cells 2. In Notepad, modify the table title to span all four columns . Product Listing (Partial) 3. In the last row of the table, move the cell containing the note to the first position . Note: In-stock items are available for pick-up or delivery. Please visit our store for special sale prices on some items. Note Step 3 is necessary because columns can be spanned only from left to right.Download from Wow! eBook 4. Format the note to span all four columns . Note: In-stock items are available for pick- up or delivery. Please visit our store for special sale prices on some items. 5. Save the file, and then refresh Internet Explorer .224 Chapter 12 CLEAN UP Close the Notepad and Internet Explorer windows.Using Tables for Page Layout In addition to their value in laying out tabular data, tables are also useful in HTML for their page-structuring capabilities . It is customary for a Web page to have a navigation bar at the top or on the left side . It is fairly easy to create a horizontal navigation bar with regular paragraphs, as you saw in Chapter 10, “Creating Navigational Aids,” but to create a vertical navigation bar, you must somehow break the page into sections . One way to do that is by using divisions, as you learned in Chapter 11 . Another way is to use a table . 225 Using Tables for Page LayoutWhen using a table for page layout, you might place your navigation hyperli ...
Tìm kiếm theo từ khóa liên quan:
kỹ thuật html5 và css3 thủ thuật máy tính bí quyết lập trình thiết kế giao diện web thế kế wordpress mẹo tin họcTài liệu liên quan:
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 319 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 307 0 0 -
Sửa lỗi các chức năng quan trọng của Win với ReEnable 2.0 Portable Edition
5 trang 216 0 0 -
Giáo trình Bảo trì hệ thống và cài đặt phần mềm
68 trang 209 0 0 -
Tổng hợp 30 lỗi thương gặp cho những bạn mới sử dụng máy tính
9 trang 206 0 0 -
Phần III: Xử lý sự cố Màn hình xanh
3 trang 206 0 0 -
UltraISO chương trình ghi đĩa, tạo ổ đĩa ảo nhỏ gọn
10 trang 204 0 0 -
Sao lưu dữ liệu Gmail sử dụng chế độ Offline
8 trang 203 0 0 -
Hướng dẫn cách khắc phục lỗi màn hình xanh trong windows
7 trang 202 0 0 -
Giáo Trình tin học căn bản - ĐH Marketing
166 trang 198 0 0