markdown HTML.CSS.JS.Forms.good practices.v1 Posted 2021-05-05
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown HTML.CSS.JS.Forms.good practices.v1相关的知识,希望对你有一定的参考价值。
fieldset {
padding:10px;
border-radius:10px;
}
label {
display:inline-block;
margin-bottom:10px;
}
input {
float:right;
margin-right:70px;
width:150px;
}
input:invalid {
background-color:pink;
}
input:valid {
background-color:lightgreen;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Form example</title>
</head>
<body>
<form id="myForm">
<fieldset>
<legend>Personal informations</legend>
<label for="firstName">First name:</label>
<input type="text" id="firstName" required name="firstName">
<br>
<label for="lastName">Last name:</label>
<input type="text" id="lastName" required name="lastName">
<br>
<label for="email">Email:</label>
<input type="email" id="email" required name="email">
<br>
<label for="age">Age:</label>
<input type="number" min=0 max=120 step=5 id="age" required name="age">
<br>
<label for="date">Birth date:</label>
<input type="date" id="date" required name="date">
</fieldset>
<button>Submit form</button>
</form>
</body>
</html>
HTML.CSS.JS.Forms.good practices.v1
-----------------------------------
A [Pen](https://codepen.io/Onlyforbopi/pen/dqxwZY) by [Pan Doul](https://codepen.io/Onlyforbopi) on [CodePen](https://codepen.io).
[License](https://codepen.io/Onlyforbopi/pen/dqxwZY/license).
以上是关于markdown HTML.CSS.JS.Forms.good practices.v1的主要内容,如果未能解决你的问题,请参考以下文章
转换rst到markdown总结
markdown [Markdown HowTo]作为Markdown语法的秘籍
python markdown干啥用的
markdown前端渲染
如何用markdown生成目录
markdown排版示例