html一些基础知识(标签,表单)

标签:

行内标签(标记,元素,节点(js中的叫法)):在一行中显示,只有当这一行显示不下的时候才会出现换行,不能设置元素的宽和高,宽和高由内容来撑起来的
行内块标签:在一行中显示,并且可以设置宽和高。

块级标签:自己独占一行,可以宽和高。

行内标签:

<span>...</span>

  <a>...</a>  链接

  <br>  换行

  <b>...</b>  加粗

  <strong>...</strong>  加粗

  <img >  图片

  <sup>...</sup>  上标

  <sub>...</sub>  下标

  <i>...</i>  斜体

  <s>...</s>删除线

  <u>...</u>  下划线

  <input>...</input>  文本框

  <textarea>...</textarea>  多行文本

  <select>...</select>  下拉列表

 块级标签:

 <h1>...</h1>  标题

  <hr>  横线

  <p>...</p>  段落

  <ul>...</ul>  无序列表

  <ol>...</ol>  有序列表

  <dl>...</dl>  定义列表

  <table>...</table>  表格

  <form>...</form>  表单

  <div>...</div>

表格:

<table border="1px" cellpadding="10px" cellspacing="10"> // cellpadding  :   这个是单元格里面的内容距离单元格边框的距离,cellspacing   :  这个是单元格与单元格之间的距离
<!--表格的标题 可省略-->
<caption></caption>
<!--表格的头部 可省略-->
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th bgcolor="aqua"></th>
</tr>
</thead>
<!--表格的主体 可省略-->
<tbody>
<tr align="center" bgcolor="bisque">//  bgcolor: 表格背景颜色 
<td valign="top"></td>
<td></td>
<td></td>
<td></td>
</tr>

colspan :跨列;rowspan :跨行。在单元格内使用如:<td colspan="3" rowspan="2"></td>,然后删除被跨的单元格。

原文地址:https://www.cnblogs.com/chendengfeng/p/10932100.html