2021年2月4日HTML笔记

建立一个基本博客页面,首先画出一个页面的草图。

html>
	<head>
		<meta charset="UTF-8">
		<title>日志</title>
	</head>
	<body>
		<h1>网页的标题segway’n USA</h1>
		<p>段落documenting my trip around the us om my very own segway</p>
		
		<h2>二级标题August20,2012</h2>
		<img src="img/segway2.jpg" />
		<p>段落well i made it1200 miles alreddy,and i passed through some interesting places on the way:walla walla,wa,magic city,id bountiful,ut last chance co
		why az and teuth or consequences nm</p>
		
		<h2>二级标题July14,2012</h2>
		<p>段落i saw some burma shave style signs on the side of the road today:"passing cars,when you can tsee may get you a li",pes
		of </p>
		
		 <h2>二级标题June2,2012</h2>
		<img src="img/segway1.jpg" />
		<p>段落My first day of the trip!I can't belleve i finally got everything packed and ready to go because i'm on
		a segway,iwasn't able to bring a whole lot with me:cell phone ipod,digital camera,and a protein bar just the
		essentials as lao tzu would have said ajourney of a thousand miles begins with one step segway"Ajourney of a thusand begins with one segway" </p>
	</body>
</html>

如果像在这个日志最后的"Ajourney of a thusand begins with one segway" 这句话中加引用功能需要用到< q>标签。

为什么要把< p>标签段落的""去掉使用< q>标签标识呢?

原因是可以让页面更加结构化,更有意义,假如你的引用需要增加颜色,或者你的引用不是对话是另有其用的功能文字则需要< q>标签的属性和属性值来改写引号后面的内容,如何改写以后会在css学习中讲到。

代码书写如下。

<p><q>Ajourney of a thusand begins with one segway</q>,或<q>这一段也要加上双引号</q></p>

< q>标签是短引用还有另外一个长引用那就是< blockquote>

< blockquote> 与 < /blockquote> 之间的所有文本都会从常规文本中分离出来,经常会在左、右两边进行缩进(增加外边距),而且有时会使用斜体。也就是说,块引用拥有它们自己的空间。

可以理解为blockquote的块引用

< q>引用和< blockquote>引用可以同时使用

代码书写

<p><blockquote>passing cars,when you can tsee may get you a li,pes of eternity</blockquote></p>
<p>用来测试的最后文字</p>
<blockquote><q>passing cars,when you can tsee may get you a li,pes of eternity</q></blockquote>
<p>用来测试的最后文字</p>

以上的元素可以简单区分块标签和内联标签

块标签有(特点是特立独行) 内联标签(随波逐流)

H1

H2 在p里面加q还在一行不会另外单独显示出来

P

BLOCKQUOTE

学习这些是为了以后善用块和内联标签。

制作网站首先是用块元素搭建结构,之后在添加内联标签增加你想要的效果和显示方式

除了这种块标签能整体让一个段落从头开始换行,如果想要块里面的内容在继续换行如何去做呢?

接下来的学习的是可以在块里面也增加换行。那就是< br>

<blockquote>passing cars,<br>
 			when you can tsee may get you a li,<br>
			pes of eternity<br>
</blockquote>

这样就会把逗号以后的话分成下一段。

< br>这种标签只是提供换行的功能我们可以称他为空标签所以就不需要有头有尾只需要换行使用。

世界上有两类标签一种是

开始标记+内容+结束标记如H1 H2 P A 等标签

另外一种是

标记 br img

设计为没有任何内容的标签称为空标签。需要使用空标签只需要一个开始标记。这是一种方便的方式,可以减少HTML中的标记数量。

posted on 2021-02-04 23:15  tallish  阅读(53)  评论(0)    收藏  举报

导航