TAILIEUCHUNG - HTML in 10 Steps or Less- P5
HTML in 10 Steps or Less- P5:Welcome to HTML in 10 Simple Steps or Less. Our mission in writing this book is to provide a quick and accessible way for you to learn Hypertext Markup Language — the lingua franca of the World Wide Web. We hope this book provides a resource that beginning and intermediate HTML coders can use to improve their Web development skills. It is also our hope that it fills multiple roles as both a teaching tool and a reference once you expand your skills. | 56 Part 2 Task Nesting Lists note Each nested list is indented beneath its parent list item. The deeper you nest the deeper the list is indented. Nesting simply means to place elements inside other elements. When you nest lists you insert a new ordered or unordered list between list items in an existing list. The existing list is called the parent list and the second nested list is called the child list. You can in turn nest a third list within the second a fourth within the third and so on. By nesting lists in this fashion each list becomes a sublist of the parent list item above it. This technique is ideal for creating formal outlines. 1. In the body of an HTML document begin the parent list by entering an ol or ul tag. 2. Define an appropriate type attribute. 3. Move to the next line indent and insert list items for your primary topics using li and li tags. 4. End the parent list with a closing ol or ul tag. 5. Beneath a list item nest a child list whose items represent subcategories of the parent list item above it. Set an appropriate type attribute for this list s ol or ul tag also. 6. Nest subsequent lists for each new subcategory level you require. A full code example appears in Listing 27-1. Figure 27-1 shows how the document appears in the browser. Figure 27-1 Nested lists rendered in the browser Please purchase PDF Split-Merge on to remove this watermark. Working with Text 57 html head title Nested Lists title head body ol type I li Main Idea li ol type A li Subordinate Idea li ol type 1 li Supporting Detail li ol type a li Example li li Example li ol li Supporting Detail li ol ol ol ul li Type defaults to disc li ul li First nest defaults to circle li ul li Third nest defaults to square. li ul li and continues as square until you set a tt type tt attribute li ul ul ul ul body html Task tip By indenting your code and even adding blank lines before and after nested lists you can easily locate where each new list begins and ends. .
đang nạp các trang xem trước