html常用标签

2018-10-14  本文已影响0人  wait_58d2

html , 超文本标记语言  ,HyperText Markup Language。

常用的标签   a   form  ul  div  p  table  h1-h6  

1.a标签(跳转页面  get请求)

①常用于链接:<a href="http://www.baidu.com" tragett="-bank"(跳转)>百度</a>

target="-bank"(跳转到空白页面) /self (当前页面) / parent(上一页面) / top()  

href="  地址" , qq.com  按照当前网页的协议来请求

                          ./indext.html  按照相对路径来请求

②下载:<a href="http://www.baidu.com" dowmload>下载</a>

③ 锚点  点击a标签后跳转到当前页面的相对位置

<a href="#one">sport </a>

<a href="#two">food</a>

<h4><a name="#one">xxxxxx</a></h4>

<h4><a name="#two">xxxxxx</a></h4>

二 form 标签 

格式  

<form method="post"(默认为get) action=" url"(数据给谁)>

<input type="text" placholder="helllo world"(当文本框没有被选中时出现的灰色的文字) name="one"> 文本框

<input type="passworld"  name="one">   密码框 

<input type="button" value="点击">  普通按钮

<input type="submit" value="点我"> 提交按钮

<input type="radio" value="男" name="one"> 单选按钮 (必须要有name属性)

<input type="checkbox" value="fruit" name="one">  多选按钮 

<select>

<option value=“”1“”selected>一月</option>    默认选中

<option value=“”2“”  disabled>二月</option>   不能选

</select>

ps (不重要)

<labal>姓名 <input  type="text" name="one"></labal>  点击到labal 上时labal中的input上有响应

三 table 表格标签

<table border="1">

<thead>

<tr><td>12</td><td>34</td><td>56</td></tr>

</thead>

<tbody>

<tr><td>12</td><td>34</td><td>56</td></tr>

</tbody>

<tfoot>

<tr><td>12</td><td>34</td><td>56</td></tr>

</tfoot>

</table>

关于设置跨行和跨列

<td colspan="3">xxxxxxxxxxx</td> 跨列

<td rowspan="3">xxxxxxxxxxx</td>跨行

跨行和跨列

四 h1-h6  一般用于标题

h1-h6多用作于标题

五 有序列表UI>LI和无序列表OL >LI 和自定义列表

无序列表中type属性值有disc(实心圆默认)、circle(空心圆)、square(实心正方形)none(取消前缀

有序列表中type的默认类型是数字,type有五个值(1,A  ,a  ,i , I,)

上一篇 下一篇

猜你喜欢

热点阅读