html基础标签/元素(1)

2017-04-13  本文已影响8人  我是卖报滴小行家
基本格式:
<html>
  <head>
    <title></title> 
  </head> 

  <body></body>
</html>
<html> 所有的标记都要放在这里 </html>
<head> 网页的头部 </head>
<title> 网页的标题 </title>
<body> 网页的内容 </body>

常用元素
<hn> n为1~6之间的整数 </hn>
<b> 文字加粗 </b>
<br> 用来换行 </br>
<I> 文字倾斜 </I>
<u> 文字底部加上底线 </u>
<DEL> 文字加上删除线 </DEL>
<TT> 标签呈现类似打字机或者等宽的文本效果</TT>
<SUP> 将文字设置成上标 </SUP>
<font color="颜色"  size="字号"  face="字体"> hello,world!</font>
<li> 设置项目 </li>
<p> 段落标记 </p>

<ol type="I">  
<li>one
<li>two
</ol>

<DT> 定义项目
<DD>定义资料

水平线:
<hr> 水平线 </hr>
<hr width="120%/400" align="left/center/right" size="10">

表格标记:
<body>
<table width="400" border="1">容器标记
<caption align="center">表格外标题</caption>
  <tr>表格中的行
  <tr><th colspan="3">表格内标题</th></tr>
    <td>lily</td>表格
    <td>22</td>
    <td>boy</td>
  </tr>
  <tr>表格中的行
    <td>aisa</td>表格
    <td>22</td>
    <td>girl</td>
  </tr>
</table>
</body>

1)表单标记:
<form id="表单的ID名称" name="表单名称" method="数据传送方式:Post/Get" action="">容器</form>

2)单行文本框:
<body>
  <form id="form1" name="form1" method="post" action="">
    请输入你的名字:
    <input type="text" name="textname" id="textname">
  </form>
</body>

3)密码文本框
<body>
  <form id="form1" name="form1" method="post" action="">
    请输入你的名字:
    <input type="password" name="password" id="password">
  </form>
</body>

4)单选按钮
<body>
  <form id="form1" name="form1" method="post" action="">
    请输入你的名字:
    <input type="radio" name="radio" id="radio" value="D1">
  </form>
</body>

5)多行文本框和按钮
<body>
  <form id="form1" name="form1" method="post" action="">
    多行文本框
      <textarea name="Ri" cols="56" rows="10"></textarea>
      </br>
        <input type="submit" name="Tj" id="Tj" value="提交">
        <input type="reset" name="CZ" id="CZ" value="重置">
  </form>
</body>
上一篇 下一篇

猜你喜欢

热点阅读