<ul>
:无序列表(unorder list)ul的type属性有:disc(默认)| circle | square
浏览器运行:
<ol>
:有序列表(order list)type属性有:1 | i | I | A | a (type属性不能填汉字,无法识别)
浏览器运行:
注意:页面缩放时,<p>
标签网页宽度有多大,不够就自己换行,而文本aaaa……aaaa不换行的原因是将aaaa……看作一个英文单词
浏览器运行:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>list</title>
<!--title为网页标题-->
</head>
<body>
<!--heading标题-->
<h1>学习使我快乐</h1>
<!--h1有默认格式(上下边距等),div没有-->
<ul>
<li>学校</li>
<li>班级</li>
<li>姓名</li>
</ul>
<!--paragraph正文-->
<p>Dangerous is so smart!</p>
<p style="text-indent: 2em;">小天使真聪明</p>
<!--控制格式:首行缩进-->
</body>
</html>
在<head>
处用 /* 注释 */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>表格</title>
<style>
/*改变偶数行颜色(不改变标题颜色)*/
tr:nth-child(even)
{
background-color: lemonchiffon;
}
/*光标移动之处改变背景颜色*/
tbody tr:hover
{
background-color: lightpink;
}
/*此处只改变tbody中的,head和foot不变*/
</style>
</head>
<body>
<h1 align="center">188****1711客户的通话记录</h1>
<table width="100%" border="1" cellpadding="5" style="border-collapse: collapse;border-color: blueviolet;color: cadetblue;">
<thead>
<tr>
<th>序号</th><!--th默认居中-->
<th>主叫号码</th>
<th>被叫号码</th>
<th>时长</th>
<th>实收(元)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">1</td>
<td>188****1711</td>
<td>155****7611</td>
<td>0:56</td>
<td>0.2</td>
</tr>
<tr bgcolor="#ccc"> <!--斑马行-->
<td align="center">2</td>
<td>188****1711</td>
<td>155****7611</td>
<td>0:56</td>
<td>0.2</td>
</tr>
<tr>
<td align="center">3</td>
<td>188****1711</td>
<td>155****7611</td>
<td>15:56</td>
<td>1.2</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3" align="right">合计</td><!--colspan合并列-->
<!--rowspan合并行-->
<td align="center">58:03</td>
<td>7:00</td>
</tr>
</tfoot>
</table>
</body>
</html>
浏览器运行:
用于提供用户界面,让用户输入操作用的
(label不是表单元素,form、input、select、option、textarea是表单元素)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>表单</title>
</head>
<body>
<!--表单标签包含表单元素(控件)-->
<form action="xxxx.php"><!--链接-->
<label for="name">注册用户名:</label><!--for里面写的是某一个表单的id名字,用于激活-->
<input type="text" value="" placeholder="提示" name="name" id="name" maxlength="20"><button>搜索</button>
<br><!--换行-->
<label>性别</label><!--for可以不写-->
<label><input type="radio" name="gender">男</label><!--用label标上后,点击文字就可勾选-->
<label><input type="radio" name="gender">女</label>
<br>
<label for="pwd">密 码</label><!-- 是转义字符:空格-->
<input type="password" name="pwd" id="pwd" placeholder="请输入8位以上数字和字母"><!--id必须有且不能重复-->
<br>
<label for="repwd">重复密码</label>
<input type="password" name="repwd" id="repwd" placeholder="请输入8位以上数字和字母">
<br>
<label for="age">年龄</label>
<input type="number" max="99" min="1" name="age" id="age" size="5">
<br>
<label for="homepage">个人主页</label>
<input type="url" name="homepage" id="homepage" required>
<br>
<label for="birth">出生日期</label>
<input type="datetime-local" name="birth" id="birth">
<br>
<label for="email">邮箱</label>
<input type="email" name="email" id="email" required>
<br>
<label for="telephone">电话</label>
<input type="tel" name="telephone" id="telephone">
<br>
<label>爱好</label><!--要写for才可以点击文字也完成勾选-->
<label for="writing"><input type="checkbox" name="hobby" id="writing">书法</label>
<label for="reading"><input type="checkbox" name="hobby" id="reading">阅读</label>
<label for="flower"><input type="checkbox" name="hobby" id="flower">绣花</label>
<label for="coding"><input type="checkbox" name="hobby" id="coding" checked>编码</label><!--checked默认勾选-->
<hr><!--分割线-->
<label for="">住址</label>
<!--下拉列表(combobox)-->
<select name="province" id="province" size="2"><!--size属性可把下拉列表变成另一种展现形式(listbox)-->
<option value="0">山西</option>
<option value="1">四川</option>
<option value="2">广东</option>
</select>
<select name="city" id="city">
<option value="01">晋中</option>
<option value="12">成都</option>
<option value="23">广州</option>
</select>
<select name="district" id="district">
<option value="0101" selected>榆次</option><!--selected:被选中-->
<option value="0102">太古</option>
<option value="0103">介休</option>
</select>
<input type="text" name="address" id="address">
<br>
<label for="remark">备注</label>
<textarea name="remark" id="remark" cols="30" rows="5"></textarea>
<br>
<input type="button" value="按钮">
<input type="submit" value="提交按钮">
<input type="reset" value="重置按钮">
<!--推荐使用button标签做按钮,也是bootstrap框架推荐,注意button默认提交-->
<button>注册</button>
</form>
</body>
</html>
浏览器运行:
a(anchor)标签
[ 培训前老师给辅导班讲的,白抄来的笔记 ]
javascript:函数名
)< a href=”javascript:xxxclick()”>文字</a>
<a href=”#top”>回到顶部</a>
(井号是id选择器的符号,必须有<div id=”top”></div>
把网页拆成多个页面
[ 培训前老师给辅导班讲的,白抄来的笔记 ]
cols属性:拆分成多列,例如cols=“20%,20%,*” 星号代表剩下的区域都给第三个区域
rows属性:拆分行
name属性:名字,用于超链接的target指定跳转到的名字
inner frame属性:用这个标签可以把网页嵌入到任何位置
src属性:包含的网页的地址
frameborder属性:边框
width属性:宽
height属性:高
——————————————————————————————————————
【听课最大的感受是没有框架,每个知识点穿插的比较杂,刚开始以为是老师讲课的习惯,学习之后才明白可能是html的特点,就是很多知识要边用边讲,没有特别清晰的大纲】
【新手笔记 欢迎指正】(标签和属性那里好像有一点乱套了)
本文地址:https://blog.csdn.net/RK_Dangerous/article/details/107291484
如对本文有疑问, 点击进行留言回复!!
2016年信息安全工程师综合知识第11-15题解析【建群网培信息安全工程师】
网友评论