HTML Beginner's Guide (6)

Source: Internet
Author: User
Tags format character set manual end html tags parent directory reference relative
Beginner Logic Style Logical Styles
<DFN>
Used for the defined word. It is usually shown in italics. (NCSA Mosaic is a world Wide Web browser.)
<EM>
Used to emphasize. Usually shown in italics. (Consultants cannot reset your password unless the Help line.)
<CITE>
Used for titles of books, and so on. usually italic display. (A beginner ' s Guide to HTML)
<CODE>
Used for computer encoding. Display with a fixed-width font. (The <stdio.h> header file)
<KBD>
for user keyboard input. is usually displayed in a unformatted fixed-width font. (Enter passwd to change your password.)
<SAMP>
Used for alphabetic sequences. Display with a fixed-width font. (segmentation Fault:core dumped.)
<STRONG>
Used for emphasis. Usually shown in bold. (Note:always check your links.)
<VAR>
For variables, you will replace this variable with certain information. Usually shown in italics. (RM filename Deletes the file.)
Physical style Tag
<B>
Bold text
<I>
Italic text
<TT>
The typewriter text is typewriter-text, such as fixed-width texts.
Escape sequence escape sequences (a.k.a. Character entities)
There are two functions of a character:

Escape special Characters
Displays characters that are not included in the normal ASCII character set (basic characters with distinguishable markers)
There are three ASCII characters--Left angle brackets (<), right angle brackets (>), and ampersand (&)--have special meaning in HTML and cannot be used as-is in text. (angle brackets are used to indicate the start and end of HTML tags, and ampersand is used to indicate the beginning of an escape sequence.) Double quotes can be used as is, but you can also use character entities (").

If you use the above three characters in an HTML document, you must enter its escape sequence instead:

<
The escape sequence of <;
>
The escape sequence of >;
&
The escape sequence of &;
Other escape sequences support accented characters, such as:

O
Small Letter o: * with vowel tones
N
Small Letter N with Tilde: *
È
Uppercase E with low accent (grave accent): *
You can substitute other letters for the above O, N, and E. Reference special characters list.

Note: The escape sequence is case-sensitive, unlike other parts of the HTML. For example, you cannot use < instead.

Link linking
The main advantage of HTML is that it can link text and/or images to another document or part of a document. The browser highlights the specified text or image with a color and/or underscore to indicate that it is a hypertext link, hypertext link (usually abbreviated as hyperlink or link).

A single HTML-related tag is <a&gt, representing anchor. Include Anchor in document:

Start an anchor with <a (a blank after a)
Specify the document you want to connect to: href= "filename", followed by a right angle bracket (>)
Enter the part of the current document as the hyperlink text
Enter anchor end tag: </A> (no blank required before anchor end tag)
Here is an example of a hypertext link to us.html:

<a href= "mainestats.html" >Maine</A>

In the example above, the word Maine is used as a hyperlink to the document Mainestats.html, which is in the same directory as the first document.

Relative path name and absolute path name
You can indicate documents linked to other directories by relative path to the current document's relative paths. For example, the link to the file nystats.html to the Atlanticstatesa subdirectory is:

<a href= "atlanticstates/nystats.html" >new york</a>

They are referred to as relative path links because the path you specify to the connection file is relative to the location of the current file. You can also use the absolute path of the file (the full URL), but the relative path is more efficient when accessing a server.

The path name is in standard UNIX format. In UNIX format, the parent directory (the directory that contains the current directory) is represented as "...". (For more information, refer to the UNIX starter reference manual such as Learning the UNIX operating System from O ' Reilly and Associates, Inc.)

If you are in the nystats.html file, you want to refer to the original document us.html, your link is as follows:

<a href= ". /us.html ">united states</a>

Generally, you should use relative links, because:

It is easier to move a group of files to another location (because the relative pathname is still valid)
The connection to the server is more efficient
Less information to type
However, if you point to a document that is not directly related to the current document, you need an absolute pathname. For example, consider a set of documents that form a user's manual. Links within this set of documents should be in relative links. Links to other documents (which may point to a related software) should be in absolute link. This way, when you move the user's manual to a new directory, all links need not be changed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.