zoukankan      html  css  js  c++  java
  • HTML

    ComTechnology - 前端 - HTML

    HTML
    1.基础
    1).<h1> header 标题
    2).<p> paragraph 段落
    3).<a href=""> anchor 锚点
    4).<img src="">自关闭元素 image 影像

    2.Element
    start tag
    end tag

    开始标签-起始标签(opening tag)
    结束标签-闭合标签(closing tag)

    元素的内容是开始标签和结束标签之间的内容

    空内容(empty content)

    元素拥有属性;

    提示:
    HTML英文字母大小写不敏感;
    W3C在H4中推荐使用小写;

    2.属性
    HTML 元素可以设置属性
    属性可以在元素中添加附加信息
    属性一般描述于开始标签
    属性总是以名称/值对的形式出现,比如:name="value"

    id 定义元素的唯一id
    class 为html元素定义一个或多个类名(classname)(类名从样式文件引入)
    style 规定元素的行内样式(inline style)

    3.格式化
    不推荐使用--用CSS

    样式与内容分离

    4.链接
    <a href="#">W3CSchool</a>
    其中“ # ”表示空链接

    target属性
    使用 Target 属性,你可以定义被链接的文档在何处显示(在新的出口打开,还是在原有的窗口中打开)
    默认的被链接文档会在原有的窗口中打开的。如果将 target 属性设置为 "_blank" 则文档就会在新窗口打开

    5.HTML头部
    <!DOCTYPE html>
    <html>
    <head>
    <title>Title of the document</title>
    </head>
    <body>
    The content of the document......
    </body>
    </html>

    <link> 标签定义了文档与外部资源之间的关系
    <link> 标签通常用于链接到样式表
    <head>
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    </head>

    meta标签描述了一些基本的元数据。
    <meta> 标签提供了元数据.元数据也不显示在页面上,但会被浏览器解析。
    <meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">
    <meta name="description" content="Free Web tutorials on HTML and CSS">
    <meta name="author" content="Hege Refsnes">

    6.图像
    <img>属性-src,源;alt
    <img src="url" alt="some_text">

    7.表格
    <table>
    <tr>
    <th>Header</th>
    </tr>
    <tr>
    <td>data</td>
    </tr>
    </table>

    8.list
    有序列表/无序列表/自定义列表

    无序 unorder
    <ul>
    <li>Coffee</li>
    <li>Milk</li>
    </ul>

    有序 order
    <ol>
    <li>Coffee</li>
    <li>Milk</li>
    </ol>

    自定义
    <dl>
    <dt>Coffee</dt>
    <dd>- black hot drink</dd>
    <dt>Milk</dt>
    <dd>- white cold drink</dd>
    </dl>

    9.区块
    <div>
    <span>

    10.form
    文本域(textarea)
    下拉列表
    单选框(radio-buttons)
    复选框(checkboxes)

    文本域(Text Fields)
    <input type="text">

    text/password/radio 单选/checkboxes 复选框/submit

    scheme://host.domain:port/path/filename
    scheme - 定义因特网服务的类型。最常见的类型是 http
    host - 定义域主机(http 的默认主机是 www)
    domain - 定义因特网域名,比如 w3cschool.cn
    :port - 定义主机上的端口号(http 的默认端口号是 80)
    path - 定义服务器上的路径(如果省略,则文档必须位于网站的根目录中)。
    filename - 定义文档/资源的名称

    --参考文档

    https://www.w3cschool.cn/

    DedoChen (原创)仰望星空 砥砺前行; 如需转载,请注明出处,谢谢!
  • 相关阅读:
    sbt设置
    scala高级内容(二)
    scala高级内容(一) Case Class
    xubuntu手记
    ScalaTour 2.函数
    ScalaTour-1.基础
    springboot对jsp模板引擎的支持
    springboot对Thymeleaf模板引擎的支持
    SpringBoot接收参数的七种方式
    idea快捷代码提示和修改
  • 原文地址:https://www.cnblogs.com/DedoChen/p/8552235.html
Copyright © 2011-2022 走看看