1: Understanding related concepts
1: The concept of WEB standards and their institutional composition
WEB standards are a collection of standards, not a single standard. These standards are mainly drafted and published by the W3C (World Wide Web).
2: Web page structure
A web page is mainly composed of three parts, namely HTML, CSS, and JAVASCRIPT. The functions are that HTML is used to write the page structure of the web page to facilitate the layout and interaction of the web page; CSS is used to layout the web page to make the structure of the web page look more beautiful; JAVASCRIPT is used to process the interaction between people and the page. generate a response. The corresponding programming languages are as follows:
The structured languages include XHTML and XML
The presentation language is CSS
The interactive behavior language is the object model, (such as W3CDOM, ECMAScript, etc.)
3: The structure and presentation standards specified by W3C: Structure ( [ or special characters as file names.
Two: HTML and related concepts
1: Hypertext Markup Language and Extensible Hypertext Markup Language
HTML refers to Hyper Text Markup Language, and XHTML refers to Extensible Hypertext Markup Language (EXtensible HyperText Language).
2: HTML5
HTML5 refers to the fifth major modification of HTML; HTML5 is the result of the cooperation between W3C and WHATWG.
HTML page is composed of tags and attributes. An HTML document is mainly composed of head (file header) and body (file body). The head part is generally not visible in the browser window (except for title and certain types of meta tags and web page logos); the body part is what the user sees in the browser viewport area.
The root element of html
File header The main body of the file, the content to be displayed on the page must be Put it in the body.Set character set, content type, encoding format
The page structure is as follows:
4: HTML classificationHTML documents can It is divided into three types, namely strict (strict type), transitional (transitional type), and frameset (framework type).
5: Writing specifications
Tag names and attribute names must be lowercase
HTML tags must be closed
Attribute values must be enclosed in quotes
Tags must be nested correctly
Document type declaration (!DOCTYPE) must be added
6: HTML basic syntax
Regular tags
A: Common block tags
div, p, h1...h6, ol, ul, dl, table, address, blockquote, form
B: common Inline tags
a, span, br, i, em, strong, label, q, var, cite, code
IMG, input
© Filing icon
9: Hyperlink
Hyperlinks are the foundation and core of the WWW. Click these links to jump from the current WEB page to another web page.
The syntax format is as follows:
URL, also called Uniform Resource Locator, is the address of a WEB web page and consists of 4 parts: http protocol, domain name, port number, and path. For example: http://www.cycf.org.cn:8080/index.html; where http:// is called the http protocol, www.cycf.org.cn is called the domain name, :8080 is called the port number, and index.html is called Page path.
10: Path
Absolute path:
Absolute path refers to the real path of the file or directory on the homepage on the hard disk. It is clearer to use the absolute path to locate the link file; but it has two disadvantages: 1. The first is that more content needs to be entered; the second is that if the file is moved, all related links need to be reset.
Relative paths:
Relative paths are most suitable for internal links of the website. As long as they belong to the same website, even if they are not in the same directory, relative links are also very suitable. This form of address takes advantage of the relative relationship between the two files that build the link and is not affected by the location of the server where the site folder is located. This writing therefore omits the same identical parts of the absolute address. The advantage of this is that when the server address where the site folder is located changes, all internal links of the folder will not cause problems.
How to write a relative path:
A: When the current file and the target file are in the same directory, directly write the target file name + extension;
B: When the current file and the target file are in the same directory If the folder is in the same directory, it is written as follows:
Folder name/full name of the target file + extension name;
C: When the folder where the current file is located and the folder where the target file is located are not in the same directory, it is written as follows :
../Folder name where the target file is located/Target file name+extension