Basic HTML Tutorial: Understanding Tags (3)

零下一度
Release: 2017-05-12 13:56:45
Original
1667 people have browsed it

1. Use ul to add a news information list

 1 <!DOCTYPE HTML>
 2 <html>
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 5 <title> p标签</title>
 6 </head>
 7 <body>
 8 
 9 
10 </body>
11 </html>
Copy after login

When browsing the web, you will find that there are many information lists on the web page, such as news lists , picture list, as shown below.

从零开始学习html(三) 认识标签(第二部分)0

News list

从零开始学习html(三) 认识标签(第二部分)1

Picture list

These lists can be created using the ul-li tag Finish. ul-li is a list of information in no order.

Grammar:

<ul>
  <li>信息</li>
  <li>信息</li>
   ......
</ul>
Copy after login

Example:

<ul>
  <li>精彩少年</li>
  <li>美丽突然出现</li>
  <li>触动心灵的旋律</li>
</ul>
Copy after login

The default style of ul-li displayed on the web page is generally: each li has a dot in front of it, as shown below Shown:

从零开始学习html(三) 认识标签(第二部分)2

Let’s try it, enter