Origin of HTML

HTML is the Hyper Text Markup Language (HTML). It is a standard Markup Language maintained by the W3C for creating web pages. Often used with CSS and JavaScript to design diverse web pages. Founded in 1990 by Tim Berners-Lee.

The basic format of HTML

<! The type of document lets the browser know that you are writing an HTML document --> <! DOCTYPE html> <! < HTML lang=" zh-cn "> --> < HTML lang="en"> <head> <! Meta tags include name, HTTP-equiv, Charset, ItemProp --> <! -- File encoding usually uses UTF-8 instead of GBK--> <meta charset="UTF-8"> <! <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <! -- Page header --> <body> <! -- The body of the page --> </body> </ HTML >Copy the code

Common table chapter labels

  • h1-h6

Six different levels of headings are presented, with < H1 > being the highest level and < H6 > the lowest.

  • section

Represents a separate part contained in an HTML document that has no more specific semantic element to represent and typically contains a title.

  • aritcle

Represents a separate structure in a document, page, application, or website, by definition, a structure that can be independently distributed or reused, as in publishing, it could be a forum post, magazine or news article, blog, user-submitted comments, interactive component, or other separate content item.

  • main

Renders the body of a document or the body of an application. The body section consists of content that is directly related to the document, or extends to the central topic of the document, or the main functional parts of the application.

  • aside

Represents a part of the page that has little to do with the rest of the content, considered separate from that part of the content and can be split off separately without affecting the whole.

  • footer

Represents the footer of the most recent section content or sectioning root element. A footer usually contains information about the chapter’s author, copyright data, or links related to the document.

  • header

Used to present introductory content, usually containing a set of useful elements that are introductory or navigational AIDS. It might contain some title elements, but it might also contain other elements, such as a Logo, a search box, an author name, and so on.

  • div

Is a general-purpose streaming content container that has no impact on content or layout without using CSS.

Global properties

  • id

Defines a unique identifier (ID) that must be unique throughout the document. The purpose is to identify elements in links (using fragment identifiers), scripts, or styles (using CSS). (Note: Do not use it unless absolutely necessary, use the class attribute instead.)

  • class

A list of classes for space-separated elements, It allows the CSS and Javascript by class selector (class selectors) or DOM methods (document. GetElementsByClassName) to choose and to access a particular element.

  • contenteditable

An enumerated attribute (enumerated attribute) that indicates whether the element can be edited by the user. If possible, the browser adjusts the widget of the element to allow editing. (Note: You can display the style attribute and modify the style in the page for debugging)

  • hidden

A Boolean attribute indicates that the element is not or is no longer related. For example, it can be used to hide page elements that are not available until the login process is complete. Browsers do not render such elements. You may not use this property to hide legally displayable content

  • style

Contains the CSS style declaration to be applied to the element. Note that it is recommended to define styles in a separate file. This property is primarily used for quick styling, for example for testing purposes. (Note: Styles are not usually placed in tag properties, usually CSS styles are used with tags.)

  • tabindex

Integer property indicating whether the element can get input focus (focatable), whether it should participate in sequential keyboard navigation, and if so, where. (Note: Values can be positive or negative integers, negative values indicate that the Tap key cannot be focused. 0 means you can focus with the Tap key, but at the end. Positive Tap keys focus in tabIndex order, if there are more than the same tabIndex, focus in document relative position)

  • title

Contains text that represents information about the element to which it belongs. This information can often be presented to the user as a prompt, but is not required.

Common content tags

  • ol + li

Oreder list, ordered list

  • ul + li

An unordered list

  • li

List item: an item in a list.

  • dl + dt +dd

Description list

  • pre

HTML condenses successive whitespace into a single space, and the pre-wrapped code block will display newlines and whitespace correctly

  • hr

Show topic transitions between paragraphlevel elements (for example, a scene change in a story, or a chapter theme change).

  • br

Generates a newline (carriage return) symbol in the text. This element is useful for writing poems and addresses, where line breaks are important.

  • a

Create a hyperlink to another web page, file, location within the same page, email address, or any other URL.

  • em

Elements can be nested, and the deeper the nesting level, the more content it contains is deemed to need to be read. Note: Normally, this element will be rendered in italics by the browser, emphasizing the importance of tone.

  • strong

Presentation text is very important and is usually shown in bold. It’s important to emphasize content.

  • code

Present a piece of computer code. By default, it is displayed in the browser’s default monospaced font.

  • blockquote

The text that represents it is quoted. This section is usually indented when rendering (note explains how to change it). If a citation comes from the Web, you can set the source URL of the original content to the Cite feature. To inform the reader of the citation’s source in text form, you can use the element.


The resources

MDN

2021-04-01