Home > Web Front-end > H5 Tutorial > Summary of HTML5 advanced inline tags (short article)

Summary of HTML5 advanced inline tags (short article)

黄舟
Release: 2017-02-20 13:40:31
Original
1419 people have browsed it

Inline elements share a line with others, but setting the width and height is invalid. Its characteristics:

① and other elements are on the same line

② Height, line height, outer margins and inner margins cannot be changed;

③ The width is The width of its text or pictures cannot be changed

 ④Inline elements can only accommodate text or other inline elements

The code is as follows:

<!doctype html>  

    <html lang="en">  

    <head>  

        <meta charset="UTF-8">  

        <title>标签基础2</title>  

    </head>  

    <body>  

        <!-- 内联元素 与别人公用一行 但是设置宽高无效 -->  

        <!-- 无语义 -->  

        <span>无语义</span>  

        <!-- 图片 alt图片加载失败显示-->  

        <img src="d" alt="加载失败">  

        <!-- 超链接 -->  

        <a href="http://www.baidu.com">跳转</a>  

        <!-- 斜体强调 -->  

        <var>斜体强调作用</var>  

        <!-- em和i经常用于制作小图标 -->  

        <em>斜体强调作用</em>  

        <i>斜体强调作用</i>  

        <!-- 加粗强调 -->  

        <strong>加粗强调</strong>  

        <!-- 表单 提交数据-->  

        <form action="">  

            <!-- 输入框 -->  

            <input type="text">  

            <!-- 密码输入框 -->  

            <input type="password">  

            <!-- 按钮 -->  

            <input type="button" value="按钮">  

            <!-- 提交表单 -->  

            <input type="submit" value="提交表单">  

            <!-- 日期 年月日-->  

            <input type="date">  

            <!-- 日期 年周 -->  

            <input type="week">  

            <!-- 日期 年月 -->  

            <input type="month">  

            <!-- 日期 当前时间 -->  

            <input type="time">  

            <!-- 选择文件 -->  

            <input type="file" value="打开文件">  

            <!-- 只能输入数字 -->  

            <input type="number">  

            <!-- 颜色选择器 -->  

            <input type="color">  

            <!-- 重置 -->  

            <input type="reset">  

            <!-- 复选框 -->  

            <input type="checkbox">我爱你   

            <input type="checkbox">你爱我   

            <!-- 单选框 name 同名字为一组-->  

            <input type="radio" name="sex" checked="checked">男   

            <input type="radio" name="sex">女   

        </form>  

        <!-- 多行文本 cols宽度 rows高度 -->  

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

        <!-- 选择列表 默认第一个选项的值为初始值-->  

        <select name="" id="">  

            <option value="">选项1</option>  

            <option value="">选项2</option>  

            <option value="">选项3</option>  

        </select>  

    </body>  

    </html>
Copy after login



The above is a summary of HTML5 inline tags in the advanced stage introduced by the editor. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template