笔记

作者: _narcissus | 来源:发表于2019-01-18 16:53 被阅读15次

    html
    不区分大小写
    <!DOCTYPE html>
    <meta charset="utf-8">
    <title></title>
    <body></body>

    字体和图片大小单位:px

    <font></font> 字体 color size 也是一个独立的文字标签
    h1-6 标题 align居中居右
    <p></p> 段落

    换行


    线
    <b></b> 加粗
    <strong></strong> 加粗
    <i></i> 斜体
    <em></em> 斜体
    <img src="" /> 图片
      空格
    &lt; &gt;< >
    &copy; ©
    " "
    <a href="" target=""></a> 链接 target为打开链接的方式
    a标签的锚点定位:一是通过ID。二是通过<a>标签本身的name属性来查找

    无序列表:无align属性
    <ul type=“disc/circle/square”>
    <li></li>
    </ul>
    有序列表:无align属性
    <ol type=1/A/a/I/i>
    <li></li>
    </ol>
    自定义列表
    <dl>
    <dt></dt>
    <dd></dd>
    </dl>

    表格
    <table border=“1” cellspacing="0">
    <tr>
    <th></th>表头 文字默认居中,加粗
    <td></td>
    </tr>
    </table>

    colspan 跨列
    rowspan 跨行


    内嵌网页
    <iframe src="x.html" frameborder="0" width="100%" scrolling="yes"></iframe>
    <iframe src="https://www.baidu.com" frameborder="0" height="500px" width="100%" scrolling="auto"></iframe>

    表单:form
    <form action="" method="post/get">

    </form>
    get为显式传值,post为隐式传值

    输入标签
    <input type="text/submit/button/reset/radio/checkbox/date/file/hidden/image src=""/"
    maxlength="" size="" value="" placeholder="" readonly> </input>

    type为按钮类型,maxlength为可输入最大长度,size为输入框长度
    button普通按钮,reset重置按钮,
    radio单选按钮(需要添加相同的name属性才能两个不能同时选中);具有checked属性,设置默认选中按钮
    checkbox为多选按钮
    date时间按钮
    file文件选择
    hidden隐藏
    value为添加内容,
    readonly只读
    disable禁用
    placeholder为添加提示,但是颜色稍浅一些
    image src="" 为设置图片按钮

    下拉列表:
    <select size="" multiple>
    <option></option>
    <option selected></option>
    </select>


    <fieldset>
    <legend>
    </legend>
    </fieldset>


    ---css-- style样式-----可以用来加上标签自身不具备的许多属性---各属性用“;”分隔。格式为属性:值---
    行样式 style属性写在标签内部,
    样式属性:
    font 字体 font-family
    text-decoration 可以去除a标签的下划线(通过样式属性)
    list-style 去掉ul标签前面的点
    color 字体颜色
    background 背景
    border 边框
    margin 外边距
    padding 内边距
    folat 浮动 消除浮动影响
    position 定位 top right bottom left

    内部样式:选择器 style写在head中
    style{
    标签{} 标签选择器
    .类名{} 类选择器 标签的嵌套: .类名 标签{}
    #id{} id选择器
    }
    外部样式:将css中的样式引入到html中
    <link rel="stylesheet" type="text/css" href=""/>


    相关文章

      网友评论

        本文标题:笔记

        本文链接:https://www.haomeiwen.com/subject/ojnndqtx.html