Front-end entry HtML knowledge point 1

Front-end HTML knowledge point 1

The development of HTML

1. June 1993: The first version of HTML was released
2. November 1995: HTML2.0
3. January 1997: HTML3.2 (W3C recommendation)
4. December 1999: HTML4.01 (W3C recommendation)
5. The end of 2000: XHTML1.0 ( W3C recommendation)
6. October 2014: HTML5 (W3C recommendation)

doctype

1. <!doctype html>: The document declaration of h5 The current web page is written according to the HTML5 standard.
When writing a web page, the document declaration of H5 must be written at the top of the web page. If you do not write the document declaration, it will cause some browsers to It will enter a weird mode. After entering the weird mode, the browser will parse the page and the page will not be displayed normally. Therefore, in order to avoid this mode, you must write a document statement

html4:

Transitional, Strict, Frameset

Weird Mode:

1. In order to be compatible with some old pages, two parsing modes are set in the browser:
standard mode and weird mode
2. Weird mode will produce some unpredictable behavior when parsing web pages, so we should avoid weird mode
3. Avoid The best way is to write the correct doctype in the page.

HTML

1.HTML (Hypertext Markup Language)
Hypertext Markup Language
2. It is responsible for the structure among the three elements
3.HTML uses the form of tags to identify different components in web pages
4. The so-called hypertext refers to hyperlinks , using hyperlinks allows us to jump from one page to another

A basic HTML page

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>网页标题</title>
	</head>
	<body>
		<h1>网页正文</h1>
	</body>
</html>

Label:

1. Tags in HTML refer to tags
2. HTML uses tag tags to describe web pages
3. Structure: <tag name>tag content</tag name>
<tag name/>

element:

1. We also refer to a complete tag as an element.
2. Here we can call the H1 above the element

<p>我是一个<em>段落</em></p>
p也是一个元素,em是p的子元素,p是em的父元素。

Attributes:

1. You can set attributes for HTML tags
2. Provide additional information for HTML elements through attributes
3. Attributes need to be set in the start tag or self-end tag.
4. Attributes always appear in the form of name/value pairs
5. For example: name="value"
6. Some attributes can be any value, while others must be specified values

<H1>title=“我是一个标题”>标题</h1>
<img src="" alt=""/>

Label:

It is necessary to tell the browser that the coded character set
mate tag used by the web page is used to set some metadata of the web page, such as the character set of the web page, keywords, and the introduction
meta is a self-closing tag. When writing a self-closing tag, you can start Add a / to the tag

Mind map
insert image description here
insert image description here
Supplement: XML is more rigorous, HTML is less rigorous than loose markup language The disadvantage of HTML is that the language is loose

Guess you like

Origin blog.csdn.net/weixin_45541388/article/details/101216631