前端之HTML(持续更新)

网页结构

<html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<meta charset=”utf-8″ />

<title>页面标题</title>

</head>

<body>

 

</body>

</html>

 

mate

<html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<meta charset=”utf-8″ />

<meta name=”keywords” content=”写给搜索引擎的关键信息描述” />

<meta http-equiv=”content-type”  content=”text/html” charset=”utf-8″/>

<title>页面标题</title>

</head>

<body>

 

</body>

</html>

 

引用

<html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<meta charset=”utf-8″ />

<meta name=”keywords” content=”写给搜索引擎的关键信息描述” />

<meta http-equiv=”content-type”  content=”text/html” charset=”utf-8″/>

<title>页面标题</title>

<style type=”text/css”></style>

<script type=”text/javascript”></script>

<link href=”Css文件名” rel=”stylesheet” />

</head>

<body>

 

</body>

</html>

 

注释

<html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<meta charset=”utf-8″ />

<meta name=”keywords” content=”写给搜索引擎的关键信息描述” />

<meta http-equiv=”content-type”  content=”text/html” charset=”utf-8″/>

<title>页面标题</title>

<style type=”text/css”></style>

<script type=”text/javascript”></script>

<link href=”Css文件名” rel=”stylesheet” />

</head>

<body>

<!–注释–>

</body>

</html>

 

标题H

<h1>标题1</h1>

 

段落

<p>段落内容</p>

 

换行

换行<br />

加粗

<strong>加粗</strong>

斜体

<em>斜体</em>

上下标签

a<sup>2</sup>H<sub>2</sub>

删除标签

<s>删除标签</s>

水平线

<hr />

div标签

<div></div>

特殊符号

&nbsp

有序列表

    <ol>

<li>项目1</li>

<li>项目2</li>

<li>项目3</li>

</ol>

 

无序列表

    <ul>

<li>项目1</li>

<li>项目2</li>

<li>项目3</li>

</ul>

表单

<form action=”x.php” method=”get或post” name=”表单”><input type=”text” value=”” />
<input type=”password” />
<input type=”button” />
<input type=”reset” />
<input type=”radio” /></form>多媒体
<embed src=”” width=”300″ height=”150″></embed>

框架
<iframe src=””> </iframe>

浮动
#s3 {
float:right;
}
p{
clear:both;
}

固定定位
span {
position: fixed;
bottom: 10px;
}

相对定位
span {
position: relative;
bottom: 10px;
}

绝对定位
span {
position: absolute;
bottom: 10px;
}
表单

<form action=”x.php” method=”get或post” name=”表单”><input type=”text” value=”” />
<input type=”password” />
<input type=”button” />
<input type=”reset” />
<input type=”radio” /></form>多媒体
<embed src=”” width=”300″ height=”150″ data-mce-fragment=”1″></embed>

框架
<iframe src=”” data-mce-fragment=”1″> </iframe>

浮动
#s3 {
float:right;
}
p{
clear:both;
}

固定定位
span {
position: fixed;
bottom: 10px;
}

相对定位
span {
position: relative;
bottom: 10px;
}

绝对定位
span {
position: absolute;
bottom: 10px;
}

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注