Write a learning summary of HTML primer today as a review and notes.
The general content includes the following points;
-
The meaning of the WWW
-
Who invented HTML
-
HTML hands type
-
Commonly used labels that represent chapters and their corresponding meanings
-
HTML Global attributes
-
Commonly used content tags and corresponding meanings
So let’s get down to business;
1. First of all, a brief explanation of WWW is closely related to the previous end
The WWW is the World Wide Web
Technically speaking, WWW= URL+ HTTP+ HTML
2. Who invented HTML?
HTML was invented around 1990 by an Englishman named Tim Berners-Lee, who was later made a Knighthood in the United Kingdom, so he is commonly known as Sir Lee. In 2017, Sir Lee was awarded the Turing Admiral.
The first thing Sir Lee did was this:
-
I wrote my own browser
-
Then he wrote a server himself
-
He then uses his own browser to access his own server
-
Then, in this form and in this idea, he invented the WORLD Wide Web, the WWW. He wanted people to be able to browse the web by typing in urls
-
There were no web addresses, there were no web pages, and he invented URL, HTML; And invented HTTP to connect the two.
3. What should HTML start with?
As shown, in vscode I created a new index.html file, which represents the basic content before we write an HTML page, namely the manual and mandatory items.
So let’s explain each line from top to bottom;
- This means that the page document type is HTML, and when the browser receives the page, it displays it according to HTML standards.
- In lang, the HTML tag indicates the language in which the page is displayed. Generally, simplified Chinese is used in China, namely zh-CN.
- Tags and tags are HTML tags. The head tag generally contains content that users can’t see, while the body tag generally contains content that users can see.
-
In, charset is an HTML tag, which indicates the encoding used to parse the page. When the browser encodes the page according to the encoding type of this attribute. Usually we use UTF-8 because it is universal and GBK is only suitable for parsing Asian languages like Chinese.
-
Used to disable form scaling, compatible with mobile phones, etc
-
Set browser-related properties. Content =” Ie = Edge “indicates that if Internet Explorer is used, the browser version is automatically upgraded to the latest version. Note: Internet Explorer comes with all versions of the kernel, you can switch.
- Title Sets the page title.
**4. What are the commonly used labels for chapters and what do they mean
Chapter tags are used to indicate the hierarchy of articles and books;
1. Headings: H1, H2, H3, H4, H5, H6
2. Chapter: Section is used to refer to a section of an article, such as the first and second chapters of a novel.
3. Article: aticle, used to hold some text content.
4. Paragraph: P, used to display the content of one paragraph after another
5. Header: Header, used to display the top content, such as the top advertisement
6. Foot: footer, used to display bottom content, such as copyright notice
7. Main content :main, used to load the main content of the page,
8. Side content: Aside, used to display side content, such as vertical navigation on the main page
9. Division: div, used to divide content into blocks, separate different content, the same package.
**5.** What are the HTML global attributes
Global attributes are attributes that all tags have;
1. Class: Classifies the current label. You can perform CSS and JS operations on the label based on the class name
2. Id: Indicates that an ID is given to the current label, and operations can be performed on it using the ID. Id is unique, but if two labels on a page use the same ID, an error will occur, but the editing software will not report an error.
3. Style: indicates the style attribute, followed by the CSS format to modify the style of the label
4. Contenteditable: Indicates that the current area can be edited. Users can still modify the area when the page is displayed on the browser.
5. Hidden: Hides the label
6. Tabindex: indicates the sequence of TAB keys. 0: indicates the last access. -1: no access. Positive: Access in order of size. The premise is that web pages support tabbing.
7. Title: indicates that when a line of text is omitted and the complete content cannot be displayed, then write the complete content inside the title and add the properties as shown below to achieve the complete content when the mouse is placed on the content.
6. Common tags and meanings of HTML
- ol+li
Ol: Ordered list indicates an ordered list. Li: List item indicates a list item. Only Li can be used in OL, not others
- ul+li
L: Unorder list is an ordered list. Li: List item is an ordered list. Only LI can be used in UL
- dl+dt+dd
Dl: Description list indicates the description list
Dt: describes the item
Dd: Describes the contents
- Pre: displays Spaces and newlines as they are, because HTML is not displayed by default
- Hr: indicates the dividing line
- Br: newline
- A: Link tag. Href = target; _blank
- Em: indicates emphasis, mainly emphasis
- Strong: emphasizes the content
- Code: Used to wrap code
- Quote: indicates a quote within a line
- Blockquote: indicates a newline reference