美文网首页
1. Introduction t0 HTML-Introduc

1. Introduction t0 HTML-Introduc

作者: 晨曦Bai | 来源:发表于2020-05-20 08:58 被阅读0次

资料来源:https://developer.mozilla.org/en-US/docs/Web/Tutorials

image.png

1. What is HTML ?

\color{red}{HTML} (Hypertext Markup Language)

  1. It is a markup Language , used to tell your browser how to structure the web pages you visit.
  2. HTML consists of a series of elements, which enclose, wrap, or mark up different parts of the content to make it appear or act a certain way.
  3. Tags in HTML are case-insensitive.
    i.e. uppercase or lowercase
    Write all tags in lowercase for consistency, readability, and other reasons.
  • Nesting elements
  • Block versus inline elements
  • Empty elements
  • Attributes

\color{red}{总结:}

  1. HTML 是标记语言,用于表示浏览器如何组建web 网页的。
  1. HTML 由一系列 元素(element) 构成。
  • 标签元素结构:


    image.png
  1. HTLM 标签不区分大小写, 一般为了方便阅读,都用小写
  1. 元素可以嵌套
  1. 元素分为块元素和行内元素
  • 块元素
    以新行显示, 结构化元素。
    e.g.
    块元素不能嵌入到行元素,可以嵌入到其他块元素
  • 行内元素
    不会另起一行, 被包含在块元素内。
    e.g. a, img , em , strong
  1. 空标签
    只有单个标签。
    e.g. <img/> , <base/> , <meta/> , <link/> , <input/> , <hr/> , <br/>
  1. 标签属性
    包含标签额外信息,该信息不会在网页内容中显示。
  • 包含属性的标签结构:


    image.png
  1. 属性名称和标签名称之间必须有一个空格
  2. 属性名称后接等号=
  3. 等号后接属性值,属性值用双引号 or 单引号括起来
  1. 布尔型属性
    只有一个属性值, 一般属性值和属性名称一样
    e.g. <input type="text" disabled>
  1. HTML 文件结构


    image.png
  1. HTML 代码中 无论有多少空格,都会解析成 1个空格
  1. 想在网页上显示特殊符号,必须使用character reference (符号引用) , & 开始 , ; 结束
    image.png

apostrophe /əˈpɒstrəfi/
ampersand /ˈæmpəsænd/
quotes

相关文章

网友评论

      本文标题:1. Introduction t0 HTML-Introduc

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