表单作用:收集用户信息


v4_表单标签_css

<!--表单控件-->
<form actinotallow="https://www.baidu.com" method="post">
账号:<input type="text" placeholder="用户名" name="username"> <br>
密码:<input type="password" placeholder="数字字母组合" name="passwd" > <br>
<!-- <input type="submit" value="提交" id=""> 按钮功能会提交信息到action指定地址 -->
<button type="submit">提交</button> <!--等价上述提交-->
</form>

css 层叠样式表

内部样式

v4_表单标签_表单_02

<head>
<style> <!--样式标签style存放在head中-->
h1{ <!--管控下方模块h1的样式-->
color:red
}
h2{color: yellowgreen;}
</style>
</head>
<body>
<h1>11111</h1>
<h2><em>22222</em></h2>

外部样式

v4_表单标签_css_03

第一种,更推荐
<link rel="stylesheet" type="text/css" href="./css/04.css">
第二种 css是一种标签,import只是css提供的一种方式,相对加载慢
<style>
@import url(./css/04.css);
</style>

行内标签   内联样式  嵌入式样式

style作为属性值直接写在标签后
<h4 style="color: blue;">ghjkghjkghjn</h4>

优先级[针对同一标签同一属性比较]:行内>内部>外部     特殊 important 加在处优先级最高

h1{color:red !important}