Home > Article > Web Front-end > The most comprehensive summary of HTML and CSS knowledge points in history, easy to understand. _html/css_WEB-ITnose
1. Basics of html css
1-1
The relationship between Html and CSS
Learning the basic technologies of web front-end development requires mastering: HTML, CSS, and JavaScript languages. Let’s take a look at what these three technologies are used to achieve:
1. HTML is the carrier of web content. Content is the information that web page creators put on the page for users to browse, and can include text, pictures, videos, etc.
2. CSS style is performance. It's like a coat for a web page. For example, title font, color changes, or adding background images, borders, etc. to the title. All these things used to change the appearance of content are called presentations.
3. JavaScript is used to implement special effects on web pages. For example: the drop-down menu pops up when the mouse slides over it. Or the background color of the table changes when the mouse rolls over it. There is also a rotation of hot news (news pictures). It can be understood that animation and interaction are generally implemented using JavaScript.
1-2
1. HTML tags are not case-sensitive.
tag, and put the paragraphs of the article into the
tag.
Syntax:
Paragraph text
tag is what you need.
Syntax:
Quote text
1. Note that the text to be quoted does not need to be quoted in double quotes. The browser will automatically add double quotes to the q tag.
2. Note that the real key point of using thetag here is not its default style of double quotes (in this case, we might as well enter the double quotes on the keyboard ourselves), but its semantics: quoting someone else's words
blockquote tag, long text quotation
is also used to quote other people’s text. But it is a reference to long text
Thetag is a reference to short text. For example, thetag is used to quote a sentence.
Syntax:
Quote text
The browser parses thetag in the indentation style
2-6
Line break tag
The tag is equivalent to the carriage return in a word document.
The dividing line tag
The
tag is also an empty tag like the
tag, so there is only one start tag and no end tag.
The default style of the
tag in the browser has thicker lines and gray color. Some people may find this style unsightly, but that’s okay. We will learn about these external styles in the future using CSS styles. After the table is created, it can be modified.
2-7
html special characters
Space: (; semicolon is essential)
2-8
address tag , add address information to the web page
Syntax:
Address information
For example:
No. 10 Dewai Street, Xicheng District, Beijing The style displayed on the browser is italic. If you don’t like italics, of course you can. You can use css styles to modify it in later lessons. The default style of tag
2-9
In websites that introduce language technology, it is inevitable to display some computer professional programming code on the web page. When the code is one line of code, you can use thetag, as in the following example: <br> <code>var i=i 300;
Syntax:
Code Language
Note: Generally, if you want to insert multiple Thetag cannot be used for lines of code. If it is multiple lines of code, the
tag can be used.
The main function of the tag: preformatted text. Text enclosed in a pre element usually preserves whitespace and newlines. If you use the previous method, you need to enter the
sign for the carriage return and the for the space.
Note: Thetag is not only used to display the source code of the computer. You can use it when you need to pre-display the format in the web page. However, a common application of thetag is to Display the computer's source code.
3. Understanding tags (Part 2)
3-1
1. Unordered list
ul-li is a list of information in no order.
Syntax:
- Message
- Message
......
Example:
- Wonderful Boy
- Beauty suddenly appears
< ;li>Soul-touching melody
The default style of ul-li displayed on the web page is generally: each li has a dot in front of it
2. Ordered list
Syntax:
- Information
- Information
......
Example:
The following is a popular course download ranking:
- Front-end development interview experience Method
- Learning html from scratch
- JavaScript Complete Guide
在网页中显示的默认样式一般为:每项
- 前都自带一个序号,序号默认从1开
3-2
容器标签
在网页制作过程过中,可以把一些独立的逻辑部分划分出来,放在一个标签中,这个标签的作用就相当于一个容器。
语法:
…
Determine the logical part:
What is the logical part? It is a set of interrelated elements on the page. For example, an independent column section in a web page is a typical logical part. As shown in the figure below: The part marked with a red border in the figure is a logical part, and you can use thetag as a container
Note:is a block-level element, that is, the browser Usually a line break is placed before and after the div element.
3-3
Five elements to create a table:
table, tbody, tr, th, td
1.…
: The entire table starts with thetag and ends with the
tag.
2. …: When there is a lot of table content, the table will be downloaded and displayed a little bit, but if the tag is added, the table will have to wait until all the table contents are downloaded. will be displayed. Such as the code in the code editor on the right. (This tag is basically not used much anymore)
3.... : A row of the table, so there are several pairs of tr and the table has several rows.
4.… : A cell in a table. One row contains several pairs of... , indicating how many columns there are in one row.
5.… : A cell at the head of the table, table header.
6. The number of columns in the table depends on the number of data cells in a row.
The table still needs to add some tags for optimization. You can add a title and summary
Inventory record from 2012 to 2013
3-4
1. Use the tag to link to other A page
uses the tag to implement a hyperlink. It can be said to be ubiquitous in web page production. As long as there is a link, there will be this tag.
Syntax:
Text displayed in the link
For example:
click here!
The above example is to click the click here! text, and the webpage links to the webpage http://www.imooc.com. < img> tag to insert images.
Syntax:
Example:
Explanation:
1. src: identifies the location of the image;
2. alt: specifies the descriptive text of the image, when When the image is not visible (when the download is unsuccessful), the text specified by this attribute can be seen;
3. title: Provides a description of the image when the image is visible (the text displayed when the mouse rolls over the image);
4. The image can be an image file in GIF, PNG, or JPEG format.
4. Form tags (interacting with users)
4-1
The form can transmit the data entered by the viewer to the server, so that the server-side program can process the form transmitted data.
Syntax:
.
2. action: The place where the data entered by the viewer is sent, such as a PHP page (save.php).
3.method: method of data transmission (get/post).
4-2
Input box
Text input box, password input box
When the user wants to type letters, numbers, etc. in the form, they will Use text input box. The text box can also be converted into a password input box.
Syntax:
1 , type:
When type="text", the input box is a text input box;
When type="password", the input box is a password input box.
2. name: Name the text box for use by the background programs ASP and PHP.
3. value: Set the default value for the text input box. (Generally used as a prompt)
4-3
Text field, supports multi-line text input
When the user needs to enter a large piece of text in the form, text input is needed domain.
Syntax:
1.