标签:sele value 展示 name checked 身体 rip 跳转 func
<!DOCTYPE html>
<html lang="en">
<!---头部-->
<head>
<!--自闭合标签-->
<meta charset="UTF-8">
<!--主动闭合标签-->
<!--浏览器的title-->
<title>摩羯座</title>
</head>
<!-- 身体-->
<body>
<div>测试</div>
</body>
</html>
知识点一、<h1></h1><h2></h2>
1、自动补齐的两种方式
输入<h1,然后输入>,自动补齐
输入h2,然后按tab自动补齐
2、h1,h2标签的效果
<!DOCTYPE html>
<html lang="en">
<!---头部-->
<head>
<!--head中内容不被展示的,是规则也是规范-->
<!--自闭合标签-->
<meta charset="UTF-8">
<!--主动闭合标签-->
<!--浏览器的title-->
<title>摩羯座</title>
</head>
<!-- 身体-->
<body>
<!--标题标签-->
<h1>h1</h1>
<h2>h2</h2>
<h2>h3</h2>
<h2>h4</h2>
<h2>h5</h2>
<h2>h6</h2>
<h2>h7</h2>
</body>
</html>
3、div和 span
<!DOCTYPE html>
<html lang="en">
<!---头部-->
<head>
<!--head中内容不被展示的,是规则也是规范-->
<!--自闭合标签-->
<meta charset="UTF-8">
<!--主动闭合标签-->
<!--浏览器的title-->
<title>摩羯座</title>
</head>
<!-- 身体-->
<body>
<!--块级标签,无论自己多大,都沾满屏幕,伪白版标签-->
<div>这是div标签</div>
<!--行内标签又叫内联标签,自己有多大就占多大,也叫白板标签-->
<span>这是span标签</span>
</body>
</html>
4
<!--属性:写在标签内部,<>之间的标签名之后,属性和属性之间用空格分隔-->
<input type="text" placeholder="请输入用户名1">
<!--value是input的默认属性-->
<input type="text" value="请输入用户名2" >
<input type="password">
5、
<form method="get">
<span>男</span><input type="radio" name="sex">
<span>女</span><input type="radio" name="sex">
<span>篮球</span><input type="checkbox">
<span>足球</span><input type="checkbox">
<input type="file">
<input type="text">
<input type="reset">
</form>
6、
<form method="get">
<span>男</span><input type="radio" name="sex" checked = checked>
<span>女</span><input type="radio" name="sex">
<span>篮球</span><input type="checkbox" checked = checked>
<span>足球</span><input type="checkbox" checked = checked>
<input type="file">
<input type="text">
<!--重置必须和form连用才起作用-->
<input type="reset">
</form>
7、
<input type="text" name = "username">
<input type="password" name = "password">
<input type="submit" value = submit--登录>
8、
<!--点击用户名获取到输入框大标签-->
<span>用户名</span><input type="text">
<label for = "user">用户名</label><input type="text" id = "user">
9、
<select>
<option value="2">篮球</option>
<option value="3">足球</option>
<option selected = "selected" value="1">兵乓球</option>
</select>
10、
<a href="http://www.baidu.com">跳转到百度1</a>
<!--原来的页面还在,新打开个页面-->
<a href="http://www.baidu.com"target="_blank" >跳转到百度2</a>
点击文字,发生跳转动作
11、
<texxtarea>多行文字</texxtarea>
<input type="text" onclick="demo()" value="登录">
<!--<script></script>写js标签-->
<script>
//def xxx():
function demo(){
console.log("1245")}
</script>
<input type="button" onclick="demo()" value="登录">
<!--<script></script>写js标签-->
<script>
//def xxx():
function demo(){
alert("提示框!!!")}
</script>
<input type="button" onclick="demo()" value="登录">
<!--<script></script>写js标签-->
<script>
//def xxx():
function demo(){
flag = confirm("确认登录?");//确认框
console.log(flag)
}
</script>
标签:sele value 展示 name checked 身体 rip 跳转 func
原文地址:https://www.cnblogs.com/luoxinmoli/p/11966734.html