HTML基础知识

HTML(Hypertext Markup Language)表示超文本标记语言,是目前网络上使用最多的语言,也是网页语言的主体。

HTML的基本结构:

<!DOCTYPE HTML>

<html>

<head>

         <title>这里是标题</title>

</head>

<body>

         <h1>制作我的第一个网页</h1>

</body>

</html>

须知:html中标签通常是成对出现的,标签中可以是小写或大写,但一般提倡小写,标签可以添加属性,如<a href=”#” style=”color:red”></a>。

HTML的基本元素:

<p>:段落标签

<br>:换行,空标签

<hr>:分割线,空标签

<hx>(x=1~6):标题,字号依次变小

<i>:定义斜体字

<b>:定义粗体字

<em>:斜体字

<strong>:加强强调语气

<ul>和<ol>:无序列表和有序列表,与<li>结合使用

<img>:图片标签

<a>:超链接

<font>:字体标签

锚点:<a href=”#lable”>跳转到锚点一</a>  <a name=”lable”>锚点一</a>

图像热区:<img src=”URL” usename=”#map名称”/>

                            <map name=”name名称>

                                     <area shape=”形状” coords=”坐标值” href=”URL”/>

                            </map>

其中shape的值有rect(矩形)、circle(圆形)、poly(多边形)。分别坐标写法为(x1,y1,x2,y2)、(x1,y1,r)、(x1,y1,x2,y2,x3,y3....)。(图片在ps中查看,步骤:视图—标尺  边缘标尺处右键选取像素  ,窗口---信息(F8))

特殊字符:        空格:&nbsp

                            小于:&lt

                            大于:&gt

                            and符号:&amp

                            引号:&quot

                            版权:&copy

                            注册:&reg

表格:

先画一个大框,再画每一行,再画每一列

<table>

<tr>

<td></td>

<td></td>

</tr>

<tr>

<td></td>

<td></td>

</tr>

<tr>

<td></td>

<td></td>

</tr>

<tr>

<td></td>

<td></td>

</tr>

</table>

Select:下拉列表

<select>

<option>上海</option>

<option>北京</option>

<option>广州</option>

</select>

原文地址:https://www.cnblogs.com/han201388/p/5718317.html