The most basic HTML tags: Links, FRAMES, span, div, and style sheet css. You must learn how to hand-write HMTL code.
I. Links
The URL of Super Text in HTML is very important. The basic format is as follows:
Link text
1. Local Link
① Absolute path strength:
Link to a local image
② Relative strength
Link relative strength to local Images
③ Link to the upper-level directory
Link to the upper-level directory
2. URL link
Format: protocol name: // host. Domain Name/path strength/file name
Protocols include:
File Local System file
Http WWW Server
Ftp Server
Telnet-based protocol
Mailto email
News Usenet newsgroup
Gopher GOPHER server
Wais WAIS Server
For example, Baidu
3. Directory Link
First, set a paragraph as the link position in the format:
Call the file in this link to define the link:
Link text
Of course, if you jump to a file, the file name can be omitted without writing.
Ii. multi-window FRAMES
HTML files designed using the FRAMES structure can divide the entire window into several independent small windows, each of which can load different files separately and communicate with each other.
1. Basic Structure:
...
2. Window Size settings
We split the window into several parts, horizontally using the ROWS attribute, and vertically using the COLS attribute. The size of each part can be achieved by the values of these two attributes.
# The value is a pair of strings enclosed by quotation marks. The numbers in the string indicate the size of each window, separated by commas (,). The numbers can also be replaced, the size is automatically allocated by the browser. For example
Evenly allocate windows other than 100 pixels
3. Mutual operations between windows
① The src attribute of frame is used to specify the content to be linked. The name attribute specifies the name of the window, and the target attribute specifies the window in which the linked file appears, the value can be the name defined by name or the following four types of values:
Display a new window
Displayed in the same window
Window for displaying the previous file in Frameset
Display in the entire browser window
② Other attributes of frame
# = Yes, no
Frameborder specifies the border settings for each window: yes indicates a border, no indicates no border
# The value is a pixel. This attribute is used to set the upper and lower Border width of the window. If it is not set, it is automatically determined by the browser.
# = Yes, no, auto
Scroll bar settings. "yes" indicates yes, "no" indicates no, and "auto" indicates automatic setting by the browser. The default value is "auto.
The noresize attribute specifies that the size of the framework cannot be adjusted. By default, you can drag the "Walls" between frames to change the frame size. This attribute can lock the frame size.
Iii. Style Sheets
1. The most important function of a style sheet is to provide a method to ensure the style of all web pages is consistent.
The three layers of the style sheet follow the order from the lower layer to the upper layer:
① Built-in style sheets: Suitable for the content of a single element
②. Document level style sheet: applies to the entire document body
③. External style sheets: can be applied to subjects of multiple documents
In use, if a conflict occurs, the low-level style sheet has the upper priority.
2. Notes for using CSS:
① Some browsers may not support certain attribute values. In this case, the browser either ignores these attribute values or replaces them with an optional value.
② The built-in style only adapts to a single element, which is contrary to the original design intention of the style sheet. Therefore, you should use it with caution.
③ The style description at the document layer appears in the header of the document, which is applicable to the entire body of the document. Therefore, the overall style of website construction can be consistent.
④ External style sheets are not part of documents that use them. They must be stored separately and described when using them. You can use MIME-type text/css to compile external style sheets into some text files, which can be stored on any computer on the Internet. The browser obtains external style sheets just like getting documents. The first The element can also be used to specify an external style table. The rel attribute specifies the relationship between the linked document and the document that contains the modified link, and the href attribute specifies the URL address of the style sheet document. For example
4. span and p
Use
In some cases, some special font attributes must be applied only to part of the text of the entire section, such as setting a word or phrase to a different font or background. This allows you to use elements, such:
I like programming very much. This is a very pleasant thing.
Use
In a webpage, a section is a common form. Each section consists of several paragraphs. If you want to design a section, you can set the style of the section on the webpage. In this case, you can use
It is mainly used to specify the appearance details of a section or area on a webpage.