想让你的网页变得整洁吗?找我就对了,当然你会认识几个新元素,和它们交朋友吧!
我帮你联系一下这几个新元素,这样交朋友就变得简单了
images里放着图片
以下是index.html的代码
1 <html> 2 <head> 3 <title>Sagway‘n USA</title> 4 </head> 5 <style> 6 q{ <!--<q>标签是小引用(没有锁紧,自动加双引号)--> 7 color: green; <!--文字是绿色的--> 8 } 9 </style>10 <body>11 <h1>Segway‘n USA</h1>12 <p>13 Documenting my trip around the US on way my very own.14 </p>15 <h2>June 2, 2012</h2>16 <img src = "images/trip.jpeg" title = "景点" alt = "经典" width = "200" height = "150">17 <p>18 My first day of the trip! I can‘t believe I finelly got evetything packed and reddy to go. Because I‘m on a segway, I wasn‘t able to bring a whole lot with me:19 <!--无序列表-->20 <ul>21 <li>cell phone</li>22 <li>ipod</li>23 <li>digital camera</li>24 <li>a protein bar</li>25 </ul>26 Just the essentials.As Lao Tzu would have said, <q>A journey of a thousand miles begins with one step segway.</q> <!--小的引用-->27 </p>28 <h2>July 14, 2012</h2>29 <p>30 I saw some Burma Shave stylesigns on the side of the road tody :31 <blockquote> <!--大的引用(有缩进,没有双引号)-->32 passing cars, When you can‘t see, May get you, A glirupse, of eternity.33 </blockquote>34 I definely won‘t be passing any cars.35 </p>36 <h2>August 20, 2012</h2>37 <img src = "images/trip2.jpg" title = "我的车" alt = "我的车" width = "200" height = "150">38 <p>39 Well I made it 1200 miles already, and I passed through some interesting places on the way:40 <!--有序列表-->41 <ol>42 <li>Walla Walla, WA</li>43 <li>Magic City, ID</li>44 <li>Bountiful, UT</li>45 <br><!--换行-->46 <li>Last Chance, CO</li>47 <li>Why, AZ</li>48 <li>Truth or Consequences, NM</li>49 </ol>50 </p>51 </body>52 </html>
仔细阅读并且理解注释的意思。
li元素也可以单独使用,不过建议你不要这么做,因为模块化是个信仰
下面来看看模块化的网页有多整洁吧
你也可以自己设计一套模块
//本系列教程基于《Head First HTML与CSS(第二版)》,此书国内各大购物网站皆可购买
转载请注明出处 by:M_ZPHr
最后修改日期:2019-01-16