1.1html Profile
It is a page description language, HyperText MarkUp Language, HTML.
* Hypertext: beyond the scope of the text, referring to possible descriptive text, pictures, screen and other content on the page above
* Tags: labels, write on the label inside the content
* Languages: html tools that interact with the user and the browser, simply, the browser will parse html tag, in order to show a specific effect out of
the main components of html:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
</ html>
* document declaration <DOCTYPE!>: html declares the type and version number
* html root tag <html> </ html>: identifies the html start and end
the head tag * html the <head> </ head>: set the page information related
* html body tag <body> </ body>: the content in the page display.
html writing specifications:
1.html file extension can be ".html" or ".htm"
format 2.html file:
3.html files must begin with <html>, to </ html> end
4.html the syntax is not case sensitive
5.html have an end tag, such as <font> content </ font>,
HTML tag if no end tag, end their own. For example <HR />
html effect: it is used to write the page to describe text, images, video and other content on the page by html tag
1.2 Single marker double labeling
1. Single marker: empty flag, end flag is not called single marker.
Syntax: <HR /> <br />
2. Dual Tags: body tag, this is marked with a beginning and end.
Syntax: <font> Content </ font>
1.3 control text and text style tags
Page special symbols in common
1.段落标记<p></p>和换行标记<br />
段落标记:段落与段落之间会自动换行
换行标记:段落内部自动换行
2.文本样式标记:<font>内容</font>
常用的属性:face 用来描述字体的样式
size 用来描述字体的大小,最大取值为7(超过7效果和7一样)
color 用来描述字体的颜色,取值三种形式:
*用英文单词表示:red,green,blue
*用16进制的数据表示:#ff0000
*用rgb三原色表示:rgb(255,255,0)
3.其它标记:
标题标记:<h1></h1>,<h2></h2>——————<h6></h6>
字体样式标记:<b></b>,<i></i>,<u></u>,<strong></strong>,<em></em>,<u></u>
<sup></sup>上标标签,<sub></sub>下标标签
取消文字换行标签:<nbor></nbor>
修饰段落的对齐属性:align
保留原始标签排版:<pre></pre>
4.图像标记:
1.图像标记:在网页上引入图片
语法:<img src="图像的url" />
常用的属性:src 用来引入图片
width 描述图片的宽度
height 用来描述图片的高度
border 用来描述图片的边框
注意:图片的路径分为绝对路径和相对路径(同级目录,上级目录,下级目录)
注释标记:<!——图像标记——>,注释标记的内容不会显示在网页上面。
****html描述网页的语言,并不是很严谨的语言,html标记通过被浏览器解析,展示特定的效果。
在网页中插入图片时,图片路径一定要正确,否则图片无法引入网页。在插入图片时,尽量使用相对路径。
5.列表
列表的主要标签
有序列表
<ol start="起始数值" type="排序类型">
<li>第一项</li>
<li>第二项</li>
</ol>
其中start为起始数值,属性值为具体的数字,type为排序类型。
有序列表中type的属性值
例如:
<body bgcolor="#99FFFF">
<ol start="1" type="1">
<li><p>你更喜欢吃哪种水果()</p>
<ol start="1" type="A">
<li>草莓</li>
<li>香蕉</li>
<li>苹果</li>
<li>西瓜</li>
</ol>
</li>
<li><p>你平时休闲常去的地方是哪里()</p>
<ol start="1" type="A">
<li>郊外</li>
<li>商场</li>
<li>公园</li>
<li>酒吧</li>
<ol>
</li>
</ol>
</body>
无序列表
<ul>
<li>第一项</li>
<li>第二项</li>
</ul>
定义列表
<dl>
<dt>名词1</dt><dd>解释1</dd>
<dt>名词2</dt><dd>解释2</dd>
<dt>名词3</dt><dd>解释3</dd>
</dl>
1.4链接标签
<A href="文件名">链接元素</A>或<A href="URL">链接元素</A>