【第五篇】input表单的Html5新增属性&表单验证&联级样式

VScode关键点
快捷表现快捷方式关键字举例
html5废弃属性版本(1.0)version 
给文字方向alignleft 默认左  center居中 right右
link的属性(UTF-8)charset 
html5新增的表单<input>元素地址栏(http://或者https://)url <input type="url" name="url"> 
邮箱(@)email <input type="email" name="email"> 
颜色color <input type="color" name="color"> 
搜索框search <input type="search" name="search"> 
数值框number <input type="number" name="number" min="2" max"10" step="3" value="min值"> 
滚动条range <input type="range" name="range" min="2" max"10" step="3" value="min值"> 
年-月-日date <input type="date" name="##"> 
月-年month <input type="month" name="##"> 
周-年week <input type="week" name="##"> 
12:20  小时+分钟time <input type="time" name="##"> 
UTC世界时间 2019/12/30 01:30:00datetime <input type="datetime" name="##"> 
可以选择时间 datetime-local <input type="datetime-local" name="##"> 
表单的初级验证提交默认语言,输入时会自动消失placeholder <input type="email" name="email"  placeholder=“###”> 
表单内元素不能空值提交required(布尔) <input type="email" name="email" require > 
符合规定的指令提交  ^凯瑞符,以什么开头;【358】3或5或8;\d 表示数字{9}pattern <input type="email" name="email" require placeholder=“11位手机号”pattern="^[158]\d{9}" > 
联级样式表内部样式stylehead中   <style> </style>
行内样式stylebody中  < h1  style="color:red;"> </h1>
链接式(链接)linkhead中   <link rel="stylesheet" href="#####">
导入式 @import url(./css/demo.css);style中    @import url(./css/demo.css);

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值