Home >Web Front-end >CSS Tutorial >Basic use of html (explanation of HTML tags)_CSS/HTML

Basic use of html (explanation of HTML tags)_CSS/HTML

WBOY
WBOYOriginal
2016-05-16 12:03:592247browse

1. Links
Hypertext links in HTML are very important. The basic format is as follows:
Link text

1. Local link
①Absolute road power:
Absolute road power links to the local image
②Relative road power
Relative road link to the local image
③Link to the upper level directory
Link to the upper level directory

2. URL link
Form: protocol name://host.domain name/roadjin/filename
Protocol includes:
file Local system file
http WWW Server
ftp ftp server
telnet Protocol based on TELNET
mailto Email
news Usenet news group
gopher GOPHER server
wais WAIS server
such as: Baidu

3. Directory link
First set a certain paragraph as the link location, the format is:

Call again The file in this link part defines the link:
link text
Of course, if you jump within a file, the file name can be omitted.

2. Multi-view window FRAMES
HTML files designed using the FRAMES structure can divide the entire window into several independent small windows, and each small window can be loaded separately different files and can communicate with each other.
1. Basic structure:







...


2. Size settings for each window
We divide the window into several pieces, using the ROWS attribute for horizontal division and vertical division. COLS attribute, the size of each block can be realized by the value of these two attributes.


The value of # is a pair of strings enclosed in quotation marks. The number in the string indicates the size of each window, with a comma in between. Separated, the numbers in them can also be replaced by "*", indicating that the browser automatically allocates the size.For example,


will evenly distribute the windows beyond 100 pixels
3. Interaction 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 is used to specify which window the linked file appears in. The value can be the name defined by name, or the following four types of values:
Display a new window
Display in the same window
Displayed in the window of the previous file in Frameset
Displayed in the entire browser window
②Other attributes of frame
#=yes, no
frameborder specifies the setting of the border of each window: yes means there is a border, no means no border


# The value is pixels, this attribute is used to set The width of the top, bottom, left and right borders of the window, if not set, is automatically determined by the browser.

#=yes,no,auto
Scroll bar settings, yes means yes, no means no, auto means automatically set by the browser, the default value is auto.


The noresize attribute specifies that the user cannot resize the frame. By default, frames can be resized by dragging the "walls" between them, and this property locks the size of the frames.

3. Style sheet
1. The most important role of the style sheet is to provide a method to keep the style of all web pages consistent.
The three levels of style sheets, in order from low level to high level, are:
①. Built-in (inline) style sheet: applicable to the content of a single element
②. Document level (document level) style sheet : Applicable to the body of the entire document
③. External (external) style sheet: Can be applied to the body of multiple documents
When used, if a conflict occurs, the low-level style sheet has priority in use. .
2. Issues to note when using CSS:
① Some browsers may not support certain attribute values. In this case, the browser will either ignore these attribute values ​​or replace them with an optional value.
②The built-in style only adapts to a single element, which actually violates the original design intention of the style sheet, so it should be used with caution.
③The document layer style description appears in the header of the document and applies to the entire body of the document. Therefore, this is how the overall style of website construction can be kept consistent.
④The external style sheet is not part of the document in which it is used. The external style sheet needs to be stored separately and must be explained when using it.External style sheets can be written into some text files using the MIME type text/css. They can be stored in any computer on the Internet. The browser obtains the external style sheet just like obtaining the document. The element at the head of the web page can also be used to specify an external style sheet. In , the rel attribute is used to specify the relationship between the linked document and the document containing the link, and the href attribute is used to specify the URL address of the style sheet document. For example


4. span and div
Use of
In some cases, some special font attributes are required to be applied only to part of the text of the entire paragraph, such as setting a certain word or phrase to a different font or background, etc. This is where you can use the element, such as:

I really like Programming, this is a very pleasant thing thing.



Usage of

In web pages, sections are a very common form. Each section consists of several paragraphs. If in the design, it is hoped that not only each paragraph can be used, but the web page can be section in to style. At this time, you can use
. Its main purpose is to specify the appearance display details of a certain section or area in the web page.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn