1网站信息页面
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>demo1</title>
</head>
<body>
<!--
h1 标题 :
h后面数字 取值范围: 1~6
-->
<h1> 标题1 </h1>
<h2> 标题2 </h2>
<h3> 标题3 </h3>
<h4> 标题4 </h4>
<h5> 标题5 </h5>
<h6> 标题6 </h6>
<h77> 标题h77 </h77>
普通文本
<!--水平分割线-->
<hr />
<p> 段落1 </p>
<p> 段落1 </p>
<p> 段落1 </p>
<hr />
<!--
font 标签常用属性
color: 颜色
size : 改变字体大小 范围:1~7
face : 字体
<标签 属性的名称="属性的值">
-->
我要<font color="red" size="1">回家 !!!</font> <br />
我要<font color="red" size="2">回家 !!!</font> <br />
我要<font color="red" size="3">回家 !!!</font> <br />
我要<font color="red" size="4">回家 !!!</font> <br />
我要<font color="red" size="5">回家 !!!</font> <br />
我要<font color="red" size="6">回家 !!!</font> <br />
我要<font color="red" size="7" face="仿宋">回家 !!!</font> <br />
我要<font color="red" size="77">回家 !!!</font> <br />
</body>
</html>
2网站图片信息案例
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>123</title>
</head>
<body>
<!--在网页中显示图片-->
<img src="../img/logo2.png" width="50%" height=200/>
<img src="../image/header.jpg" width="30%" />
</body>
</html>
3友情链接
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<!--
1.使用无序列表
百合网
世纪家园
珍爱网
非诚勿扰
-->
<body>
<ul>
<li style="display: inline;"><a href="http://www.baihe.com" target="_blank">百合网</a></li>
<li style="display: inline;"><a href="http://www.jiayuan.com" target="_blank">世纪家园</a></li>
<li style="display: inline;">珍爱网</li>
<li style="display: inline;">非诚勿扰</li>
</ul>
</body>
</html>
4网站首页
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<!--
1. 创建一个8行一列的表格
2. 第一部份: LOGO部分: 嵌套一个一行三列的表格
3. 第二部分: 导航栏部分 : 放置5个超链接
4. 第三部分: 轮播图
5. 第四部分: 嵌套一个三行7列表格
6. 第五部分: 直接放一张图片
7. 第六部分: 抄第四部分的
8. 第七部分: 放置一张图片
9. 第八部分: 放一堆超链接
-->
<table width="100%" >
<!--第一部份: LOGO部分: 嵌套一个一行三列的表格-->
<tr>
<td>
<table width="100%">
<tr>
<td>
<img src="../img/logo2.png" />
</td>
<td>
<img src="../image/header.jpg" />
</td>
<td>
<a href="#">登录</a>
<a href="#">注册</a>
<a href="#">购物车</a>
</td>
</tr>
</table>
</td>
</tr>
<!--第二部分: 导航栏部分 : 放置5个超链接-->
<tr bgcolor="black">
<td height="50px">
<a href="#"><font color="white">首页</font></a>
<a href="#"><font color="white">手机数码</font></a>
<a href="#"><font color="white">鞋靴箱包</font></a>
<a href="#"><font color="white">电脑办公</font></a>
<a href="#"><font color="white">香烟酒水</font></a>
</td>
</tr>
<!--第三部分: 轮播图 -->
<tr>
<td>
<img src="../img/1.jpg" width="100%" />
</td>
</tr>
<!--第四部分: 嵌套一个三行7列表格-->
<tr>
<td>
<table width="100%" height="500px">
<tr>
<td colspan="20">
<h3>最新商品<img src="../img/title2.jpg"></h3>
</td>
</tr>
<tr align="center">
<!--左边大图的-->
<td rowspan="2" width="206px" height="480px">
<img src="../products/hao/big01.jpg" />
</td>
<td colspan="3" height="240px">
<img src="../products/hao/middle01.jpg" width="100%" height="100%" />
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
</tr>
<tr align="center">
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
</tr>
</table>
</td>
</tr>
<!--第五部分: 直接放一张图片-->
<tr>
<td>
<img src="../products/hao/ad.jpg" width="100%" />
</td>
</tr>
<!--第六部分: 抄第四部分的-->
<tr>
<td>
<table width="100%" height="500px">
<tr>
<td colspan="7">
<h3>热门商品<img src="../img/title2.jpg"></h3>
</td>
</tr>
<tr align="center">
<!--左边大图的-->
<td rowspan="2" width="206px" height="480px">
<img src="../products/hao/big01.jpg" />
</td>
<td colspan="3" height="240px">
<img src="../products/hao/middle01.jpg" width="100%" height="100%" />
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
</tr>
<tr align="center">
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
<td>
<img src="../products/hao/small06.jpg" />
<p>洗衣机</p>
<p><font color="red">$998</font></p>
</td>
</tr>
</table>
</td>
</tr>
<!-- 第七部分: 放置一张图片-->
<tr>
<td>
<img src="../image/footer.jpg" width="100%" />
</td>
</tr>
<!--第八部分: 放一堆超链接-->
<tr>
<td align="center">
<a href="#">关于我们</a>
<a href="#">联系我们</a>
<a href="#">招贤纳士</a>
<a href="#">法律声明</a>
<a href="#">友情链接</a>
<a href="#">支付方式</a>
<a href="#">配送方式</a>
<a href="#">服务声明</a>
<a href="#">广告声明</a>
<br />
Copyright © 2005-2016 传智商城 版权所有
</td>
</tr>
</table>
</body>
</html>
5注册入门案例
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<!--
表单标签
action : 直接提交的地址
method :
get 方式 默认提交方式 ,会将参数拼接在链接后面 , 有大小限制 ,4k
post 方式 会将参数封装在请求体中, 没有这样的限制
input :
type: 指定输入项的类型
text : 文本
password : 密码框
radio : 单选按钮
checkbox : 复选框
file : 上传文件
submit : 提交按钮
button : 普通按钮
reset : 重置按钮
hidden : 隐藏域
date : 日期类型
tel : 手机号
number : 只允许输入数字
placeholder : 指定默认的提示信息
name : 在表单提交的时候,当作参数的名称
id : 给输入项取一个名字, 以便于后期我们去找到它,并且操作它
textarea : 文本域, 可以输入一段文本
cols : 指定宽度
rows : 指定的是高度
select : 下拉列表
option : 选择项
-->
<form action="../04-网站首页/网站首页.html" method="post" >
<!--隐藏域
主要是用来存放页面上一些ID信息
-->
<input type="hidden" value="sadfaldsfkjl@o3214813278" name="uid"/>
<!--文本输入框-->
用户名: <input type="text" placeholder="请输入用户名" /><br />
<!--密码框-->
密码: <input type="password" placeholder="请输入密码" /> <br />
确认密码: <input type="password" /> <br />
邮箱: <input type="text" /> <br />
手机号码: <input type="tel" /> <br />
靓照: <input type="file" /> <br />
性别: <input type="radio" name="sex" />男
<input type="radio" name="sex" />女
<input type="radio" name="sex" />妖 <br />
爱好:
<input type="checkbox" />抽烟
<input type="checkbox" />喝酒
<input type="checkbox" />烫头
<input type="checkbox" />撸代码
<input type="checkbox" />大宝剑
<br />
择偶要求:
<textarea cols="40" rows="4"></textarea><br />
籍贯 :
<select>
<option>--请选择--</option>
<option>湖北</option>
<option>内蒙古</option>
<option>火星</option>
</select>
<br />
出生日期:
<input type="datetime-local" /> <br />
验证码: <input type="text" /><br />
<input type="submit" value="注册"/>
<input type="button" value="普通按钮"/>
<input type="reset" value="重置按钮"/>
</form>
</body>
</html>
6网站后台
这个需要不同的html,加上链接
7一些语法总结:
1<div align="center">
align 意思是 设定图像的对齐方式,其属性可选值为:top,bottom,middle,right,left等等。
2 colspan 属性规定单元格可横跨的列数。
3HTML:<a>
<a> 标签定义超链接,用于从一张页面链接到另一张页面。
<a> 元素最重要的属性是 href 属性,它指示链接的目标。
eg:<a href="http://www.w3school.com.cn">W3School</a>
4HTML:target=_blank
_blank -- 在新窗口中打开链接
_parent -- 在父窗体中打开链接
_self -- 在当前窗体打开链接,此为默认值
_top -- 在当前窗体打开链接,并替换当前的整个窗体(框架页)
一个对应的框架页的名称 -- 在对应框架页中打开
5<div style="display:none">
1、display:none和visible:hidden都能把网页上某个元素隐藏起来。
2、但两者有区别:
●display:none ---不为被隐藏的对象保留其物理空间,即该对象在页面上彻底消失,通俗来说就是看不见也摸不到。
●visible:hidden--- 使对象在网页上不可见,但该对象在网页上所占的空间没有改变,通俗来说就是看不见但摸得到。
6html <front> 具有属性
7html里面src
HTML中src是source的缩写,这里是源文件的意思。“source”本身是“源”的意思。
<img src="路径">
<script src=""></script> 链接到javascript路径
<iframe src=""></iframe>框架内表示的页面路径
8html中width="80%"和width="80"
width="80%" 是针对它父容器宽度的百分之80,而width="80"是宽度就是80px(像素)。
补充:
按百分比来规定宽度是相对于其父容器的宽度,比如一个大的表格(宽度200px)中里建立一个小表格,如果写width="80%",那这个小表格的宽度就为160px,如果写的width="80"
那这个小表格的宽度就是80px。