HTML学习(—..—)

8.27 HTML入门
学习心得:
1.HTML是一种标记语言
2.用标记标签来描述网页
3.html由html标记及文本内容来组成
4.所有内容要放到各种标记当中
大体格式:
 

<html>
<head>
	<title>web学习</title>
</head>
<body>

</body>
</html>

语法格式:
<标记名称 属性1="属性值" 属性2="属性值"...>内容</标记名称>

<font color="white" size="8" face="宋体">您好</font>

Attention:
标记一般是成对出现的
开始标记<标记名称>,结束标记记为</标记名称>
html不区分大小写 建议小写
属性值可用双引号或者单引号
标记可以嵌套使用 但必须为完全嵌套 不能错乱

常用的设置颜色的方法有三种
1.<font color="red">
2.<font color="rgb(255,0,0)">
3.<font color="%ff0000">


对html头部和躯干进行标记

code:

<html>
<head>
	<title>web学习</title>
	<meta name="keywords" content="title,meta">
	<meta name="description" content="这是一个关于..的网站">
	<meta http-equiv="refresh" content="3">
</head>
<body bgcolor ="teal",text="white"
	link="blue" alink="olive" vink="red" topmargin="30" leftmargin="30"
>
	gaygay也太秀了
</body>
</html>

解释:
title是网页标签
meta是关键字索引,提高被搜索引擎搜索到的概率
http-equiv可以设定网页的自动刷新的频率,及网页跳转,还有网页的字符集(个人理解为网页所使用哪国的语言)
keywords是关键字设置项目 content是具体的关键字
description是设置项目 content是具体的描述信息
refrsh表示刷新 content表示秒数
text表示文本颜色 bgcolor背景颜色
link alink vlink分别表示超链接被点击前,时,后的三种颜色,matgin表示边距

猜你喜欢

转载自blog.csdn.net/qq_17175221/article/details/82118907