Getting Started with HTML Notes 1

  1. Who invented HTML
  2. The full English name of HTML is Hyper Text Markup Language, invented by Tim Berners-Lee (Sir Lee) in The UK.

  3. What should I start with in HTML
  4. <! DOCTYPEhtml>(Document type)<html lang="en">(Define document language, Chinese: "zh-cn ")<head>(Contents contained in the head are hidden and not displayed on the page)<meta charset="UTF-8">(The character code of the file, "UTF-8" is the universal code)<meta http-equiv="X-UA-Compatible" content="IE=edge">(Tell IE to use the latest kernel)<meta name="viewport" content="Width = device - width, initial - scale = 1.0">(Optimized for mobile web pages, no zooming, compatible with mobile phones)<title>Document</title>(Document title)</head> 
    <body>(Document body)</body>
    </html>
    Copy the code

  5. What are the common labels of table sections
  • Acronyms for h1 to H6 head. Each heading has a single line and is of decreasing importance
  • The section tag defines an area of the document, indicating that the content is a whole.
  • Paragraph tag p Each paragraph is a block, and there are obvious gaps between paragraphs
  • Header A header that defines a document or a section of a document, usually used as an introduction or navigation link bar.
  • In a typical case, this element would contain the name of the author of the document, copyright information about the document, links to terms of use, contact information, and so on.
  • Main contents
  • Aside from the above
  • Divs can be used for web layout

  • What are the global properties
    • Class (to classify a tag, or to give a tag a tag)
    • Contenteditable can have any element edited
    • Hidden can be used to hide a page element and can be displayed by display:block
    • id

      If you’re adding elements that are unique across the page, you can use ids, but the uniqueness of ids is not guaranteed,Try to use class instead of ID. In addition, the existing global properties of window cannot be overwritten by the tag (window can be queried in console), such as: parent/top/self…

    • Style specifies the inline style of the element. The priority is the highest. If CSS, HTML and JS have different styles at the same time, they will be rendered as JS content.
    • tabindex

      All interactive items on the page can be accessed with the TAB key, and tabIndex is used to control the order in which tabs are accessed. Can be the tabindex = 1.2.3… Continuous numbers, or discontinuous numbers, are accessed in ascending order,The special value 0 indicates the last access and -1 indicates no access.
    • The title title property specifies additional information about the element. Information is displayed when you hover over the element.

  • What are the common content tags
    • An OL ordered list can contain more than one Li, but cannot contain any child elements other than Li.
    • Ul + LI Unordered list defaults to a dot style
    • Dl + DT + DD Defines the list description list (DL) Describes the description of the object described in the list DESCRIPTION term (DT) Description data (DD)
    • Pre preformatted text Text surrounded by pre tag elements preserves Spaces and carriage returns.
    • Hr horizontal divider
    • Br, a new line (break)
    • A hyperlink

          <a href="Jump target" target="Target window popup mode">Text or image</a>
      Copy the code
      Href specifies the url for the link target. Target specifies how the linked page should be opened. <br> (install the Death to _blank plugin to open all pages as the current window)Copy the code
    • Em (Emphasis) Mood is important. The type of text is slanted for emphasis
    • The strong text itself is important
    • By default, the quote reference has no rendering effect and only serves as a reference. By default, the quote is inlined and does not wrap.
    • Blockquote newline/block-level reference. Browsers usually indent blockQuote elements.

    Extra knowledge: overflow ellipsis

    white-space: nowrap; (Don't wrap) text-overflow: ellipsis; (3) Overflow: hidden; (1)... Said)Copy the code

    © This article is originally published by Easar. The copyright belongs to me and Hungru