HTML练习(勿看)

1.标签

1.img

<img src="" alt="" title="" width="" height=""/>
alt是图像加载失败,显示默认文字
title是鼠标悬停在图片显示的文字

2.a

<a href="" target="_blank">   </a>新页面打开
<a href="img.zip" target="_self">   </a> 默认,当前页面打开
这个就是下载,超链接

锚点链接

<a href="#live">个人生活</a> 点击上面的跳转到下面



<h1 id="live">个人生活</h1>

3.表格

1.基本语法

<table align="center" border="1" cellpadding="20" cellspacing="0"> 表格居中
    <tr> 行
        <th></th> 列,加粗
        <th></th>
    <tr>
    <tr>
        <td></td>
        <td></td>
    <tr>
<table>

cellpadding: 表格数据到左边竖线的距离
cellspacing: 表格分割线之间的距离

 2.表格结构

<table>
    <thead>
        
    </thead>

    <tbody>
    </tbody>
</table>

3.合并单元格

 

跨行(上下合并)<td rowspan="2" ></td>

跨列(左右合并)<td colspan="2" ></td>

 4.表单

1.input的type属性

  • file
  • hidden
  • image 图像形式提交按钮
  • radio 单选框(必须有同一个name)
  • reset 重置
  • submit 
  • checkbox 复选框

2.label

2.特殊字符

3.H5新特性

1.新标签

  • <header> 头部标签

  • <nav> 导航标签

  • <article> 内容标签

  • <section> 定义文档某个区域

  • <aside> 侧边栏标签

  • <footer> 尾部标签

 

2.form表单

<!-- 我们验证的时候必须添加form表单域 -->
<form action="">
    <ul>
        <li>邮箱: <input type="email" /></li>
        <li>网址: <input type="url" /></li>
        <li>日期: <input type="date" /></li>
        <li>时间: <input type="time" /></li>
        <li>数量: <input type="number" /></li>
        <li>手机号码: <input type="tel" /></li>
        <li>搜索: <input type="search" /></li>
        <li>颜色: <input type="color" /></li>
        <!-- 当我们点击提交按钮就可以验证表单了 -->
        <li> <input type="submit" value="提交"></li>
    </ul>
</form> 

 3.表单新属性(自动聚焦,历史记录)

required="required"

multiple="multiple"

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Java狂魔哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值