html元素&属性的总结

<html><!-- 注释 -->

<head><!-- 头 -->

<meta charset="utf-8">

<meta http-equiv="Content-Type" content="text/html;charset=Utf-8"><!-- 页面显示的字符集的设定 -->

<meta http-equiv="expires" content="Wed, 20 Jun 2007 22:33:00 GMT"><!-- 设定网页的到期时间 -->

<meta http-equiv="Pragma" content="no-cache"><!-- 禁止浏览器从本地缓存调阅内容 -->

<meta http-equiv="Refresh" content="2;URL=http://www.baidu.com"><!-- 刷新,等待2s后跳转到指定页面 -->

<meta http-equiv="Set-Cookie" content="cookievalue=xxx;expires=Wed, 20 Jun 2007 22:33:00 GMT;path=/"><!-- 一旦网址过期,删除缓存>

<meta http-equiv="Window-target" content="_top"><!-- 强制页面在当前窗口独立显示 -->

<meta http-equiv="cache-control" content="no-cache"><!-- 清除页面缓存 -->

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><!-- 关键词,用于引擎搜索 -->

<meta http-equiv="description" content="this is my jsp"><!-- 用于描述网页 -->

<title>这里输入网页的标题...<title>

<link href="<%=path%>" rel="stylesheet" type="text/css"><!-- rel是relationship的缩写,指链接文档与当前文档的关系,stylesheet是样式表的意思 -->

<script type="text/javascript src="<%=path%>">

</head>

<body>

<div class="" id="" style="padding:60px 0px"><!-- 如果1个参数,则为上右下左全部的填充值,如果两个,第一个上_下,第二个左_右,如果三个,分别上_右_下,如果四个,上_右_下_左-->

<ul>

<li style="display:none"></li><!-- 隐藏 -->

<li><em></em><!-- 斜体 --><strong></strong><!-- 粗体 --></li>

<li><span></span><!-- 无特殊效果 --></li>

</ul>

<!-- 表单提交只能提交input,textarea,select的值 -->

<form action="url" method="get/post" id="fo1" enctype="multipart/form-data"><!-- enctype="multipart/form-data"是用于上传图片文件的,没有的话会乱码 -->

<input type="hidden" id="" name="" value="">

<input type="text" id="" name="" value="">

<input type="password" id="" name="" value="">

<input type="file" id="" name="" ><!-- type="file" 中的value会被禁用 即不能在这里给他赋值,否则会直接把用户本地文件直接提交到服务器上 -->

<input type="radio" name="type" value="1"> <input type="radio" name="type" value="2">

<input type="checkbox" name="favourite_<%=id%>" cheked="checked"><!-- 上传到action之后可以用集合或数组接收,checked为已选中 -->

<input type="button" id="" name="" value="">

<input type="submit id="" name="" value="">

<input type="reset" id="" name="" value="">

<button id="" name="" value="">

<!-- 这里需要注意一点,在不给定type的时候,其默认type="submit",所以如果要是想禁用按钮的提交功能,或者想用ajax提交时,需要加上type="button" -->

</form>

<font></font>

<h1>1级标题</h1>

<p οnclick="">段落</p><!-- onclick为点击事件 -->

<a href="javascript:void(0);">超链接</a><!-- 这里将超链接禁用了 -->

<br/>

<select id="" name="" form="fo1">

<option value="">string...string...string</option>

<option value="" selected="selected">string...string...string</option><!-- 这里的被默认选中了 -->

<option value="">string...string...string</option>

</select>

<hr/>

<dl><!-- 列表 -->

<dt>列表标题</dt>

<dd>列表内容</dd>

<dd>列表内容</dd>

<dd>列表内容</dd>

</dl>

<img class="" id="" src=""  alt="未找到图片"><!-- 图片 -->

<textarea id="" name="" ></textarea><!-- 文本域 -->

</div>

</body>

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值