1, an overview of the
HTML (HyperText Markup Language) was invented by Tim Berners-Lee, a physicist at CERN in the 1990s. HTML was published in HTML4.01 in 1997 and HTML5 in 2014. HTML: defines the structure and content of web pages, CSS: Define the style of the web page, JavaScript: Define the behavior of the web page and the user.
2. Basic concepts of web pages
2.1 the label
Double tag and single tag
Tag nesting is case-insensitive
2.2 elements
Tag tree, node node, page element Element tag and element tag From a source point of view element from a change point of view
tag corresponds to the page p elements nested form a hierarchy of page elements: parent and child elements
2.3 Block-level elements, inline elements
Block and inline, as well as inline-block, block-level elements occupy a separate region by default, the P tag; By default, inline elements are on the same line as other elements and do not generate a newline, span tag.
2.4 attributes
Img SRC =”demo.jpg width=”500px”. The size of the attribute value is not sensitive. HTML provides a large number of attributes to customize the behavior of the tag
3. Basic tags of web pages
3.1<! doctyope>
The first TAB of a web page, indicating the document type, tells the browser how to parse the page.
3.2<html>
The top-level container, the top-level node, the root element, all the other elements are child elements, only one per page
3.3<head>
A container tag that places meta information about a web page, content that does not appear on the web page, and provides additional information for web rendering
3.4<meta>
Metadata used to set up or describe a web page, which can have more than one meta, with conventions placed first in the head content. There are five attributes: charset specifies the encoding mode of the web page utF-8; Name /content specifies a metadata item for the web page; Http-equiv/Content These two attributes are related to HTTP and belong to advanced usage.
3.5<title>
Used to specify the title of the web page, displayed in the browser window title bar; Affect the sorting of web pages in search engines, can only place plain text without format.
3.6<body>
The container tag, used to place the body of the web page, follows the head
4. Space and line breaks
The header and tail Spaces are ignored. Multiple Spaces are merged by the browser. Newline \n and carriage return \r are replaced with Spaces.