欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

#WEB安全基础 : HTML/CSS | 0x4HTML模块化

程序员文章站 2022-07-05 15:34:43
想让你的网页变得整洁吗?找我就对了,当然你会认识几个新元素,和它们交朋友吧! 我帮你联系一下这几个新元素,这样交朋友就变得简单了 images里放着图片 以下是index.html的代码 1 2 3 Sagway'n USA 4

想让你的网页变得整洁吗?找我就对了,当然你会认识几个新元素,和它们交朋友吧!

我帮你联系一下这几个新元素,这样交朋友就变得简单了

#WEB安全基础 : HTML/CSS | 0x4HTML模块化

images里放着图片

#WEB安全基础 : HTML/CSS | 0x4HTML模块化
 

以下是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元素也可以单独使用,不过建议你不要这么做,因为模块化是个信仰


下面来看看模块化的网页有多整洁吧

#WEB安全基础 : HTML/CSS | 0x4HTML模块化

你也可以自己设计一套模块


//本系列教程基于《head first html与css(第二版)》,此书国内各大购物网站皆可购买


转载请注明出处  by:m_zphr

最后修改日期:2019-01-16