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