HTML

HTML入门知识点

1:基本编辑格式

<html>
   <head>
     <meta charset="UTF-8">
     <title>点击这里输入标题</title>
   </head>
   <body>
   </body>
</html>

:2:基本标签:
标题:<h1>~<h6>(双标签)

<h1> 定义最大的标题。<h6> 定义最小的标题

   <h1>This is a heading</h1>
   <h2>This is a heading</h2>
   <h3>This is a heading</h3>

段落:<p>(浏览器会自动地在段落的前后添加空行(<p> 是块级元素))

   <p>This is a paragraph</p>
   <p>This is another paragraph</p>

链接:<a>
&lt;a href="url"&gt;内容&lt;/a&gt;
属性:target:_blank 打开一个新窗口 _parent在原来的窗口中打开
如何链接到一个网页的不同位置
1:同一个网页中跳转

        目标位置:<a id="name"></a>
         链接位置:<a href="#name"></a>

   2:不同网页之间的跳转

        目标网页:<a id="name"></a>
         链接网页:<a href="文件地址#name"></a>

  实现邮箱地址之间的跳转

<a href=”mailto: 邮箱地址”></a>


**图像:<img>**

` <img src="url"/>`

alt:替换文本属性
      路径:
             相对路径:/ :表示根目录

                        ./ :表示当前目录

                        ../ : 表示上一级目录(../../上二级)

             绝对路径:从盘符开始

**样式标签**
     b  、strong  加粗    
        del  删除线    
         i 、em   倾斜   
       sub  下标     
         sup   上标
         pre  预格式化 
     small 小号字 
     big  大号字 
     hr  水平线
         br 换行
        注释:<!--需要注释的内容-->
    **  表格 <table>**
<table>
<tr>
<th></th>(表格的表头 居中加粗)
</tr>
<tr>
<td></td>
</tr>
</table>

    *合并单元格*
    1:跨列
    <table>
    <tr>
    <td></td>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    </table>
    2:跨行
    <table>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td rowspan="2"></td>
    </tr>
    </table>

**  列表**
1:无序列表

<ul>
<li></li>
<li></li>
</ul>

2:有序列表

<ol>
<li></li>
<li></li>
<li></li>
</ol>

3:自定义

<dl>
<dt></dt>
<dd></dd>
<dt></dt>
<dd></dd>
</dl>

**表单**
<form></form>
type属性:text:    定义常规文本输入。
radio   :定义单选按钮输入(选择多个选择之一)
checkbox:多选框
submit  :定义提交按钮(提交表单)

文本输入:
<form>
<input type="text" name="" value="">
</form>

单选框:
<form>
<input type="radio" name="sex" value="male" checked>女
<input type="radio" name="sex" value="female">男
</form>

多选框:
<form>
        <input type="checkbox"  checked/>音乐
        <input type="checkbox"/>旅游
        <input type="checkbox"/>看书
</form>
下拉表单:
<selsct name="">
<option value="">   </option>
  <option value="">    <option>
  <option value="">   <option>
</select>

多段文本域:
<textarea> 元素定义多行输入字段(文本域)
<textarea name="" id="" cols="" rows="" style=""> 内容</textarea>

**按钮**
<input type="submit"> 提交
<input type="reset"> 重置
<input type="button" value="不确定">
<button></button>

同意以上协议
<label for="agree">
    <input type="checkbox" id="agree">
        同意以上协议
</label>

**预定义选项列表**
<datalist> 元素为 <input> 元素规定预定义选项列表。

<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>


用户会在他们输入数据时看到预定义选项的下拉列表。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值