HTML basis of the first part

What page is?

  The foundation is a page of text, images, links constituted. Web page also includes forms, tables, animation, music and so on yuan

Su. We often see the page mostly HTML + CSS + JavaScript composition. They represent the structure, performance

And behavior. HTML authoring articles trunk, CSS decorative items appearance, JavaScript is responsible to make goods moving.

 

What is HTML?

  • It is an HTML
  • HTML is not a programming language, it belongs Markup Language
  • HTML pages were produced by marking labels

Creating an HTML document

  Documents that contain HTML tags are called HTML file, HTML document called extension .html or .htm.

 

The basic structure of the HTML

<!DOCTYPE html>
  <html>
    <head>
      <meta charset="UTF-8">
      <title>基本结构</title>
    </head>
    <body>
      网页主体
    </body>
  </html>


  DOCTYPE beginning of the structure is a standard generalized markup language document type declaration, the main role is to tell the standard

Quasi Generalized Markup Language parser (browser) to use what type of document to parse the document.

  The above statement at the beginning of the code is written to tell the browser, according to the latest parse html document types. Specific can

Disclaimer mode can refer MDN documentation https://developer.mozilla.org/zh-CN/

<html>

  <head>

    <!--

      - here it is mainly the interpretation of the document, define, describe, the introduction of the script and so on (you can

      Understood as a reference script, tells the browser where to find style sheets, provide meta information and some omissions

      Formal content to a content reader)

    -->

  </head>

  <body>

    <!--

      The content of the page layout, editing, displaying the page, is the subject of html

    -->

  </body>

</html>

HTML tag syntax

  • Commonly referred to as HTML markup tags HTML tags
  • HTML tags are keywords surrounded by angle brackets, such as <br>
  • HTML tags are usually in pairs, such as <p> </ p>
  • Tags typically by a pair of a start tag and an end tag, in addition to the specific external, single-label

  Note: The start and end tags are also called opening tags and closing tags, labels to be closed with "/" end

  • Nested label not random, such as: Error writing <span> <b> </ span> </ b>

               Correct wording <span> <b> </ b> </ span>

  • Tags are not case sensitive, but the best lowercase (JavaScript to review the specific reasons in say)
  • Each tag is closed
  • N same label can have different properties
  • The most important point, HTML tag symbol symbols are in English, or if an error is difficult to find a single pair of labels and tags Detailed

 

Paired Labels

  • It contains the start and end tags
  • Content written in the middle of the label
  • Property write in start tag angle brackets (not recommended, exercises are available)

例如<a href="https://www.baidu.com" style="textdecaration:none"></a>

 

Single-label

  • Only one angle brackets label
  • Properties directly written in angle brackets

例如<img src="123.jpg" alt="123">

 

HTML attributes

Must be placed in the start tag, attributes can provide a more diverse style for labels

 

element

Start and end tags with the content inside is called an element

 

HTML comments

Show Comments is the description of the code, the browser will not

Comment tags to <-! Footnotes ->

 

HTML head tag in common

<head>

  <meta charset="UTF-8">

  <Title> tag title </ title>

  <Meta name = "keywords" content = "keyword, a plurality of keywords with a comma" />

  <Meta name = "description" content = "OVERVIEW This page" />

</head>

 

HTML font tags used

h1 ~ h6, strong, em, span, u, i, b of these tags are commonly used fonts, the effect is not specific to show

appendix:

Common HTML tags Daquan https://www.cnblogs.com/hjjun/p/6274995.html

Doctype role of https://www.cnblogs.com/alwaysblog/p/5822834.html

Personal Wealth cloud description link http://note.youdao.com/noteshare?id=8da6cf24ced7255d4e7a9272f5ce66b8

Guess you like

Origin www.cnblogs.com/zangshengjie/p/11027219.html