- Practical Web Development
- Paul Wellens
- 126字
- 2021-07-16 13:14:07
Lists
In almost every document, you will find the need to sum up a number of items in a list. In HTML you have the choice between an unordered list (think bullets) and an ordered list (think numbers). The HTML elements for these lists are <ul>
and <ol>
.
This example produces a list of colors:
<h2>Colors</h2> <ul> <li>red</li> <li>green</li> <li>blue</li> </ul>
This will generate a list of colors, each preceded by a (round) bullet. Replacing <ul>/</ul> by <ol>/</ol>
will give you a numbered list. Attributes existed to specify the shape of the bullet but these are long gone. Bullet styles are specified in CSS these days. You can even use an image file for the bullet.
A third list element that is worth looking into is <dl>
or data list.
推薦閱讀
- JavaScript:Functional Programming for JavaScript Developers
- 零基礎玩轉區塊鏈
- ASP.NET Core 2 and Vue.js
- HTML5 Mobile Development Cookbook
- 匯編語言程序設計(第2版)
- Java Web基礎與實例教程
- Windows Server 2012 Unified Remote Access Planning and Deployment
- MySQL入門很輕松(微課超值版)
- Java SE實踐教程
- Building Serverless Architectures
- Python 3 數據分析與機器學習實戰
- 例說FPGA:可直接用于工程項目的第一手經驗
- Python人工智能項目實戰
- Java程序設計(項目教學版)
- Python Business Intelligence Cookbook