Html基本属性和标签

html注释

        <!--      -->     快捷键:ctrl+/

头部属性

        DOCTYPE:告诉浏览器用什么规范

        meta:描述网站信息

        charset:字符集

        <!-- 告诉搜索引擎网站关键信息,便于搜索 -->

        <meta name="keywords" content="关键字">

        <meta name="description" content="描述">

基本属性

        <strong></strong>                 粗体

        <em></em>                           斜体

        &nbsp;                                   空格

        &gt;                                        >

        &lt;                                         <

        &copy;                                    版权符号

img标签

        <img src="path" alt="text" title="text" width="x" height="y">

        path:图像路径

        alt:加载不出图片时的替代文字

        title:鼠标悬浮时的提示文字

        width:宽度

        height:高度

 a标签

        <a href="path" target="_blank/_self" >文字或图像</a>

        path:要跳转的路径

        _blank:新网页打开

        _self:当前网页打开(默认)

        <!-- 锚标签,使用id标记页内跳转 -->

        <a href="" id="top"></a>

        <a href="#top"></a>        

        <!-- 跳转到name.html的top位置 -->

        <a href="name.html #top"></a>

        <!-- 跳转到邮箱 -->

        <a href="mailto:12345667@qq.com"></a>

列表

        <!-- 无序列表 -->

        <ul>

            <li></li>

        </ul>

        <!-- 有序列表 -->

        <ol>

            <li></li>

        </ol>

        <!-- 自定义列表 -->

        <dl>

            <dt>标题</dt>

            <dd></dd>

        </dl>

表格

        <!-- border:边框宽度; tr:行; td:列-->

        <table style="border: 1px;">

            <tr>

                <!-- 跨列 -->

                <td colspan=""></td>

                <!-- 跨行 -->

                <td rowspan=""></td>

            </tr>

        </table>

媒体元素

        <!-- 视频;controls:视频控制条,必须加视频才能播放 -->

        <video src="" controls autoplay></video>

       

        <!-- 音频;autoplay:自动播放 -->

        <audio src="" controls autoplay></audio>

框架

        <!-- 在hello里面打开链接 -->

        <iframe src="path" frameborder="0" name="(框架名)hello"></iframe>

        <a href="http://adasda" target="hello"></a>

表单

        <!--

            get:可以在url中看到自己的信息,高效,不安全,不能传输大文件

            post:不会看到,比较安全,可以传输大文件

         -->

        <form method="post/get" action="result.html">

           

            <!-- 文本、密码、提交、重置、按钮 -->

            <!-- placeholder:提示信息;required:非空 -->

            <input type="text" name="" id="" placeholder="提示信息" required>

            <input type="password" name="" id="">

            <input type="submit" name="" id="">

            <input type="reset" name="" id="">

            <input type="button" name="" id="">

            <!-- 单选、复选; checked:默认选中 -->

            <input type="radio" name="第一题" id="" checked>A

            <input type="radio" name="第一题" id="">B

            <input type="radio" name="第一题" id="">C

            <input type="radio" name="第一题" id="">D

            <input type="checkbox" name="" id="" checked>A

            <input type="checkbox" name="" id="">B

            <input type="checkbox" name="" id="">C

            <input type="checkbox" name="" id="">D

            <!-- 多行文本域 -->

            <textarea name="" id="" cols="30" rows="10" maxlength=""></textarea>

            <!-- 下拉框 默认第一个是selected,选中状态 -->

            <select name="" id="">

                <option value="" selected>A</option>

                <option value="">B</option>

                <option value="">C</option>

                <option value="">D</option>

            </select>

            <!-- 按钮 -->

            <input type="button" name="" id="">

            <!-- 文件域:提交文件 -->

            <input type="file" name="" id="">

            <!-- 邮件、url、数字验证 -->

            <input type="email" name="" id="">

            <input type="url" name="" id="">  

            <input type="number" name="" id="" max="" min="" step="">

            <!-- 滑块(调音量) -->

            <input type="range" name="" id="" max="" min="" step="">

            <!-- 搜索框 -->

            <input type="search" name="" id="">

            <!-- 标签域 -->

            <label for="search">搜索</label>

            <input type="search" name="" id="search">

        </form>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值