directory

HTML: Hyper Text Markup Language

HTML is different from XHTML

HTML writing specification

The basic structure of HTML web pages:

The label

HTML5 tags come in two types: regular tags and empty tags

The link label

form


HTML: Hyper Text Markup Language

HTML is hypertext Markup Language, an application of the standard Universal Markup Language. Hypertext refers to the fact that a page can contain non-text elements such as images, links, and even music and programs. The HTML structure consists of a “Head” section (English: Head) and a “Body” section (English: Body), where the “Head” section provides information about the page and the “Body” section provides the details of the page.

 

W3C: Founded in 1994, the World Wide Web Consortium (W3C) is the most authoritative and influential international neutral technical standards body in the field of Web technology.

HTML is different from XHTML

  1. XhtmI signature must be written; In HTML, case insensitive
  2. Attribute names must be lowercase in xhtmI; The htmI attribute name must also be lowercase
  3. Tags must be strictly nested in XHTML; HTML has no strict rules about the nesting of tags
  4. Tags in xhtmI must be closed; It is also true that tags in htmI are not closed, that is, they can appear unpaired
  5. Tags for XHTML hollow elements must be closed, such as

    ,


    ; There is no requirement in htmI
    !>
  6. Attribute values in XHTML must be enclosed in double quotes; Attribute values in htmI may not use double quotes
  7. Attribute values in XHTML must be in full form, i.e. K ; In HTML you can use the shorthand < inputDisabled >
  8. In XHTML, a distinction should be made between “content tags” and “structural tags”. For example,< p> is a content tag and

    , whereas

    is a structural tag. It is not allowed to place table> in

    can be placed in < TD >
    of

HTML writing specification

HTML is not case sensitive, but we generally use lower case. 2. Comments in HTML cannot be nested, or have comments within them. 3. 4. HTML tags can be nested but cannot be cross-nested. 5. Attributes in HTML tags must have values, and the values must be quoted

 

The basic structure of HTML web pages:

 

<! DOCTYPE html>

<! The DOCTYPE> declaration is located very first in the document, before the < HTML > tag.

<! DOCTYPE> declaration is not an HTML tag; It is used to tell the Web browser which HTML version of the page is used.

Document Type HyperText Mark-up Language is the HTML5 standard web declaration, fully known as Document Type HyperText Mark-up Language, which stands for Document Type HyperText Markup Language or HyperText link markup Language, and is now in this concise form, which is recognized by all major browsers that support the HTML5 standard. Represents the web page using HTML5, <! The DOCTYPE> declaration is located very first in the document, before the < HTML > tag. This tag tells the browser which HTML or XHTML specification the document uses.

H5 document declaration, which states that the current web page is written according to THE HTML5 standard be sure to put the H5 document declaration at the top of your web page if you don’t put the document declaration, some browsers will go into a weird mode and when they go into weird mode, the browser will parse the page and it won’t display properly, So to avoid entering this mode, be sure to document the declaration

Differences between HTML 4.01 and HTML5

HTML 4.01 specifies three different <! DOCTYPE> declaration, respectively: Strict, Transitional, and Frameset. HTML5 provides only one:

<! DOCTYPE html>

<html></html>

HTML root tag. There is only one root tag on a page, and everything should be written in the root tag

<head></head>

The content in the head tag is not displayed directly on the web page and is used to help the browser parse the page

<title></title>

Title the title tag of a web page, by default, is displayed in the title bar of the browser. When searching a page, the search engine will first retrieve the content in the title tag. It is the most important content in the web page for the search engine, which will affect the page’s ranking in the search engine

<body></body>

The body tag is used to set the theme content, and all the visible content of the web page is written in the body

The < meta > tag

The <meta> element provides meta-information about the page, such as descriptions and keywords for search engines and update frequency. Meta can also specify the description of a page. When searching a page, the search engine will retrieve both the keyword and description of the page, but neither of these will affect the ranking of the page in the search engine

The meta tag can be used to set the keywords of web pages. Name is a description of content

The <meta> tag is at the head of the document and contains nothing. The attributes of the <meta> tag define the name/value pairs associated with the document.

The meta tag is used to set the meta data of the web page. For example, the character set, description, and keyword meta is a self-ending tag

 

HTML5 tags come in two types: regular tags and empty tags

< General tags >

< tag attribute = “Attribute Value” Attribute = “Attribute Value” ></ tag >

An empty tag

< Tag attribute = “Attribute Value” 1>

Description:

  • The first word written in <> is called tag, tag, element.
  • Tags and attributes are separated by a space, attributes and attribute values are connected by an equal sign, and attribute values must be placed inside “”.
  • A tag can have no attributes or multiple attributes in any order.
  • Empty tags have no closing tag and are replaced with a /.

 

The title tag < H1 ></h1>……. <h6></h6>

H1 is the largest and H6 is the smallest in the display effect

When we use HTML tags, we care about the semantics of the tags, and the tags we use are semantic tags

Among the 6 level headings, H1 is the most important, indicating the main content of a web page, while H2-H6 is in descending order of importance

H1 is second only to title in importance to a search engine. After the title is retrieved, the search engine immediately looks at the contents in h1

H1 will affect the ranking of the page in the search engine. Only one page can be written

Generally, the tags on the page are h1, H2, h3 only

<h1>Level 1 label</h1>
<h2>Level 1 label</h2>
<h3>Level 1 label</h3>
<h4>Level 1 label</h4>
<h5>Level 1 label</h5>
<h6>Level 1 label</h6>
Copy the code

 

Newline tag <br />

You can wrap a page with a BR tag, which is a self-closing tag

Paragraph tag <p></p>

Paragraph tag, used to represent a paragraph of content

Use the P tag to represent a paragraph

The text in the P tag is by default a single line, with a line spacing

Horizontal line label < HR />

The HR tag is a horizontal line and also a self-ending tag

<strong></strong> <b></b>

Text slant tag <em></em>

Special symbols:

  • &nbsp; The blank space In HTML, any amount of space between characters is interpreted by the browser as a space, and a newline is interpreted as a space
  • &gt; Is greater than the number >
  • &lt; Less than”
  • &quot; The quotation marks”
  • &copy; Copyright Symbol @

Image tag <img />

Href =”#” > </a>

Page to page link

A link from one page to another

Anchor link

Use name for the anchor point, and then use href=”#name name”

  • Move from A on page A to B on page A
  • Jump from A on page A to B on page 8
  • Href =” [path]# value”
  • Href =” path # value “href=” path # value “href=” path # value”

 

form

Advantages: simple and easy to use, stable structure

Basic structure: cell, row, column

Table border border

Table alignment: default alignment, center alignment, left alignment, right alignment

Cell alignment: horizontal alignment, vertical alignment

 

 

Learn together and make progress together. If there are any mistakes, please comment