TAILIEUCHUNG - Learning Web Design Third Edition- P13

Learning Web Design Third Edition- P13:Everything you need to know to create professional web sites is right here. Learning Web Design starts from the beginning defining how the Web and web pages work and builds from there. By the end of the book, you'll have the skills to create multi-column CSS layouts with optimized graphic files, and you'll know how to get your pages up on the Web. | Linking Within Your Own Site NOTE Linking to another spot on the same page works well for long scrolling pages but the effect may be lost on a short web page. Linking to a specific point in a page Did you know you can link to a specific point in a web page This is useful for providing shortcuts to information at the bottom of a long scrolling page or for getting back to the top of a page with just one click. You will sometimes hear linking to a specific point in the page referred to as linking to a document fragment. Linking to a particular spot within a page is a two-part process. First you identify the destination and then you make a link to it. In the following example I create an alphabetical index at the top of the page that links down to each alphabetical section of a glossary page Figure 6-11 . When users click on the letter H they ll jump down on the page to the H heading lower on the page. Step 1 Naming the destination AUTHORING TIP To the Top It is common practice to add a link back up to the top of the page when linking into a long page of text. This alleviates the need to scroll back after every link. I like to think of this step as planting a flag in the document so I can get back to it easily. To create a destination use the id attribute to give the target element in the document a unique name that s unique as in the name may only appear once in the document not unique as in funky and interesting . In web lingo this is the fragment identifier. You may remember the id attribute from Chapter 5 Marking Up Text where we used it to name generic div and span elements. Here we re going to use it to name an element so that it can serve as a fragment identifier that is the destination of a link. Here is a sample of the source for the glossary page. Because I want users to be able to link directly to the H heading I ll add the id attribute to it and give it the value startH Figure 6-11 O . h1 id startH H h1 NOTE Remember that id values must start with a letter

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.