Article From:https://www.cnblogs.com/yaya625202/p/9124258.html

Edit this page

HTMLDocument structure

 

hemlNotes:

<!--Note Content-->

 

  • Annotations can not be nested
  • Just can’t write in the HTML label

<!--The document type marks the document as a HTML file-->
<!DOCTYPE html>
<!--Page root node-->
<html lang="en"><!--Double closed label-->
    <head>
        <!--The container contains style, title, meta, script, link and other tags.-->

        <!--Declaring header meta information, encoding format for documents-->
        <meta charset="UTF-8" />
        <title>Title</title>
    </head>
    <body>
        <!--Contains content labels displayed by browsers, DVI, P, a, IMG, input, etc.-->
        This is our document structure</body>
</html>

View Code

 htmlStructural brain map

htmlLabel

  • lang=”en”,default language

headLabel

Describes all kinds of information about a document, including document titles, encoding, URL, and so on, mostly for indexing, identification, or other applications, such as mobile terminals.

title

document title

meta

  • http-equiv
    <!--Redirect 2 seconds to jump to the corresponding site-->
    <meta http-equiv="refresh" content="2;url=http://www.jd.com">
    <!--Specify document content type and encoding type-->
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <!--Tell the IE browser to render in the most advanced mode-->
    <meta http-equiv="x-ua-compatible" content="IE=edge">

 

  • name:Keywords and descriptions are used to optimize search engines. Multiple keywords are separated by commas.
    <!--SEOoptimization-->
    <meta name="keywords" content="meta,html,metaSumming up, the meta attribute ">

link:Referencing an external stylesheet

<link rel="stylesheet" type="text/css" href="01htmlDocument structure.Html ">

 

  • rel:Style sheet
  • type:Document type
  • href:Connection address

Defining site icons

<!--Defining site icons-->
<link rel="icon" href="fav.ico">

 

style:Defining an internal stylesheet

<style type="text/css">
    <!--Internal stylesheet --></style>

 

  • type:Document type

script:Defining the internal script file

  • type:Document type, definition of internal script file
    <script type="text/javascript">
        <!--Defining the internal script file-->
    </script>
  • src:Connecting the external script file
    <!--Connecting the external script file-->
    <script src="02meta.js"></script>

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *