What is HTML and Web standards for beginners?
- Abbreviation for HTML Hypertext Markup Language (Hyper Text Markup Language)
- HTML is not a programming language, but a markup language (markup language)
- Tags < english words or letters > called tags, an HTML page is made up of a variety of tags.
- Markup language set of tag tags (markup tag)
- Markup languages and programming languages have a different compilation process, which is done directly by referring HTML pages to browser parsing.
- HTML uses tag tags to describe web pages that describe how hypertext content is displayed, such as font, color, size, and so on.
- Hypertext audio, video, pictures, etc. are considered hypertext.
- These tag tags will not appear on the page when the browser is finished parsing the display to the user.
What's the use of HTML?
- The role of HTML is used to describe document semantics . (in HTML, except semantics, nothing else)
What is an HTML tag?
* HTML 标记标签通常被称为 HTML 标签(HTML tag)* HTML 标签是由尖括号包围的关键词,如
What is the use of HTML tags?
- Role: Different HTML tags give different semantics to text.
- What does the H1 tag do when I ask you in the interview?
- Correct answer: The H1 tag is used to add the semantics of the main title to the text, and only one H1 tag can be found on a page (only one of the article names)
- Wrong answer: The H1 tag is used to add bold, black, and enlarged text.
HTML document = Web pageThe purpose of a Web browser is to read an HTML document and display it as a Web page, and the browser does not display the HTML tags in it, but instead uses tags to parse the contents of the page.
- HTML documents are used to describe web pages.
- HTML documents contain HTML tags and plain text.
- HTML documents are called Web pages (popular terminology)
- A Web page can be viewed as a page that consists of various tags.
- Homepage (home) the start Page or navigation page of the site.
Cases:
<!-- 放在此类标签是注释, <body> <!-- <body> 与 </body> 之间的文本是可见的页面内容主体正文 --> <!-- <p> 正文段落:学习HTML的第一天。</p> <!-- <p> 与 </p> 之间的文本被显示为段落 --> </body>
Web standards
- World Wide Web Consortium, the organization of web standards development.
- Web Standard production Web pages follow the specification, which is not a standard, but a collection of standards .
- Web pages consist mainly of three parts: structure (Structure), performance (Presentation) and behavior (Behavior)
- The corresponding web standards are divided into three aspects: structured standard language, performance standard language, and behavioral standards.
- Structured standard language: mainly XHTML and XML, used to describe web pages.
- Performance standard language: Mainly CSS, used to beautify the Web page.
- Behavioral standards: Mainly including the object model (such as the Web DOM), ECMAScript, JS to make the page rich vitality, dynamic.
Code standards
- Must end tag
- HTML can open multiple labels without having to write the corresponding end tag to close them.
- This is not legal in XHTML. In addition, the conventions must be marked with a closing tag.
- XHTML requires a rigorous structure, and all tags must be closed.
If the label is not paired individually, close it by adding a "/" to the label at the end.
* 双边标记 <span\></span>* 单边标记 <br>转成<br />
- lowercase elements
- HTML is insensitive to case, and XHTML is case sensitive .
- XHTML requires that all labels and attribute names must be lowercase.
- Case inclusions are also not recognized.
- The example dreamweaver automatically generated attribute name "OnMouseOver" must also be modified to "OnMouseOver".
- Reasonable nesting
- Attribute value Quotes
Special symbols
* 任何小于号(<),只要不是标签的一部分,都必须被编码为<* 任何大于号(>),只要不是标签的一部分,都必须被编码为>* 任何与符号(&),只要不是实体的一部分,都必须被编码为&* 注:上面的特殊符号中间没有空格,且后面带分号。
- All properties are assigned a value
- XHTML specifies that all properties must have a value, repeating itself without a value.
- "--" in the comments
- "--" can only occur at the beginning and end of XHTML annotations, i.e. they are no longer valid in content.
Although the above standards are only required in the XHMTL specification, HTML is not illegal, but the programmer will still follow their own by default.
Basic syntax features of HTML
- The HTML is not sensitive to the line, the tab is not sensitive, the number of lines and tab change does not affect the structure of the page.
- HTML does not rely on indentation to represent nesting, but rather to look directly at the label's parcel relationship.
- But good indentation helps to read and understand the code, so it's best to use indent tags correctly.
- Blank folding Phenomenon
- All the text in the HTML, if there are spaces, line breaks, tab will only be collapsed into a space display.
- The label must be tightly closed
HTML and XHTML
- Xhtml:extensible hypertext Markup Language, Extensible Hypertext Markup Language.
- The letter X in XHTML, which means " strict ".
- The XHMTL is basically the same as the HTML4.0 mark.
- XHTML is different from HTML4.0, which can be called strict and pure HTML.
- The main purpose of XHTML is to standardize the HTML4.0, or to be understood as an upgraded version of HTML4.0.
- But the real upgrade, HTML5, greatly simplifies the DTD (specification), meaning that HTML5 does not have to differentiate between XHTML and HTML.
- HTML markup Writing is very irregular, it may cause other devices (ipad, mobile phone, TV, etc.) can not display properly.
- The HTML4.01 contains two general and XHTML specifications.
- HTML4.01 This version is IE6 start compatible.
- HTML5 is IE9 start compatible.
Article: Tiele and Cat
2018-5-21
Reference :
1. Introduction to HTML
2. HTML introduction and head tag
3, Baidu Encyclopedia: Web Standards
Initial knowledge of HTML and Web standards