HTML Hypertext Markup Language Overview forms the basic elements of a Web page

Source: Internet
Author: User
Tags definition end header lowercase mail reference window
Web page

  2.1 topics (title)

The title element is the only element in the header of the file that must appear, and it can only appear in the file header. The format of the title element is:
<title> file Title </title>

Title The title of the HTML file, is a summary of the contents of the file. A good topic should enable the reader to determine the approximate content of the document. The title of the file is not normally displayed in the text window, and the name of the window appears.
In addition to identifying a window, title is used as either a bookmark or a default filename when a homepage is saved to bookmarks or files.

There is no limit to the length of the title, but the long title will cause the line to be broken, and in general it should not be longer than 64 characters. Because the role of title is to mark the contents of the file, so too short title is also undesirable, such as: Introduction This topic, the reader can not judge according to it what this article describes. A good example of this is:

<title> a Introduction to HTML 2.0 </title>

Other elements, such as <isindex>,<meta>, can also appear in the header element. These elements are not required, and are not commonly used. The use of these elements and their meanings can be referenced in the literature.

The following is one of the simplest HTML files

<title>the simplest HTML file</title>
This is the My-i-i-HTML file.

  §2.2 title (HN)

The

Caption element has 6 types, H1, H2,... h6, used to represent various topics in the article. The smaller the title number, the larger the font. In general, the browser explains the title as follows:

H1 Bold, oversize, centered, with two blank lines up and down.
H2 Bold, large font, one to two lines up and down
H3 Bold (italic), large font, the left side of the miniature, upper and lower blank line
H4 bold, ordinary font, more indentation than H3, the top of a blank line
H5 Bold (italic), and h4 the same indentation, the top of a blank line
H6 bold, with the same indentation as the text, the top of a blank line
Netscape 2.0 for the explanation of HN, all boldface, font is getting smaller. The

HN can have alignment properties, align=#, #表示
Left header is in the left-hand
Center title, centered on
right title,

Example:


The example of HN and its output are given below:


§2.3 segmented <p>

HTML browser is based on the window, the user can change the size of the display area at any time, so the HTML will be multiple spaces and carriage return equivalent to a space, which is different from most word processors. The fragmentation of HTML is entirely dependent on the segmented element <P>. For example, the following two sections of source files have the same output.

Paragraphy one <p>paragraph two <p>
... ... ... ... ... ... ... ... ... ...
Paragraph one <p>
Paragraph two <p>

<p> can also have a variety of properties, the more commonly used properties are: aligh=# #可以是left, center,right, its meaning ditto
Text

Example <p Align=center>this is a centered paragraph </p> when there is a graphic in the HTML file, the graphic may occupy one end of the window, and there may be a larger space around the graphic. At this point, without the clear attribute
<p> may cause the contents of the article to appear in the blank area. To ensure that the next paragraph appears below the graphic, you can use the clear property. The Clear property means:

Clear=left The next section shows a blank area at the left edge
Clear=right The next section shows a blank area at the right edge.
Clear=all There's no other content on either side of the next section.

  List of §2.4 lists

The list is used to enumerate the facts, and the commonly used list has 3 forms, the unordered list (unordered list), the ordered list (ordered list) and the definition list.

  2.4.1 unordered list (UL)

Unordered list starts with (UL), each list item uses <li> Guide, finally is </ul>, note that the list entry does not need the end link sign </Li>. The output is indented for each list entry and is marked with a black dot.

Cases:

source files
<ul>
<li>today
<li>tommorow
</ul>

Output is

Today
Tommorow
 
  2.4.2 ordered list <ol>

An ordered list is an example of an instance and its output, as opposed to an unordered list, except that the list entry is digitally marked at the time of output:

<ol>
<li>today
<li>tommorow
</ol>

The output is:

1.Today
2.Tommorow

  2.4.3 Definition list <dl>

Defines the occasion for a brief description of a list entry, with the <dl> start, the list entry is guided by <dt>, and its description is guided by <dd>.

<dl>
<dt>item 1
<dd>the Definition of item 1
<dt>item 2
<dd>definition or explaination of item 2
</dl>

The output is:
Item 1
The definition of item 1
Item 2
Definiton or explaination of item 2

  2.4.4 Change the entry mark

1. Change unordered list entry tags

Unordered list output, each currently has a black dot, the user can modify the item's tag in type Order. Type can be disc solid dot Cirde circle square solid Square Dot

<ul>
<li Type=disc>one
<li Type=circle>two
<li Type=square>three
</ul>

The output is:
One
0TWO
THREE

2. Change ordered list entry mark

The default value for ordered list entry tokens is Arabic numerals, which can be modified with the type attribute. Method is <Litype=#>
#=a, capital letters

A, lowercase letters
I, capital Roman numerals
I, lowercase roman numerals
L, default, Arabic numerals

<ol><li Type=a>one-one
<li>ONE-TWO</ol>
A.one-one
B.one-two

<ol><li Type=a>one-one
<li>ONE-TWO</ol>
A.one-one
B.one-two

<ol><li Type=i>one-one
<li>ONE=TWO</ol>
Ⅰ.one-one
Ⅱ.one-two

<ol><li Type=i>one-one
<li>ONE-TWO</ol>
I.one-one
Ii. One-Two
<ol><li Type=1>one-one
<li>ONE-TWO</ol>
1.one-one
2.one-two

3. Change the order list entry of the beginning of the number

The number of entries in an ordered list is by default starting from 1, which can be modified with the Start property. Method is <ol start=#> #是条目起始号

<ol start=5>
<li Type=a>one-one
<li>one-two
<ol start=10>
<li>two-one
<li Type=i>two-one
</ol></ol>

E.one-one
F.one-two
10.two-one
Xi. Two-two

  Nesting of 2.4.5 lists

Various lists can be nested together, and each list entry can be a separate list. For each nested layer, the output of the manifest entry will be indented more greatly. Please refer to the example above.

   §2.5 Pre-typesetting text <pre>

HTML output is based on the window, so the HTML file in the output is to be reflow, if you do not need to rearrange the content, you can use <pre>...</pre> to inform the browser. The browser in the output, to this part of the content is almost unmodified output, the output of the font telex typewriter font. The early HTML specification stipulated that formatting could not occur in the pre-typesetting area
The element of the output. such as HN, Netscapr2.0 when encountered in the pre-typesetting elements, allow the other elements.

<pre>
Please use the Your card.
VISA Master
<b>here is a order form.</b>
<ul><li>fax
<li>air Mail </ul>
</pre>

Your Card
VISA Master
This is the order form.
Fax
Air Mail

  § 2.6 Block references <BQ>

A block reference indicates that the content is a reference. In the browser to block references to the interpretation of the general is left and right indent, the top and bottom each have a blank line, some browsers also use italic character.

  §2.7 Center

Many elements have alignment attributes, such as HN, p, and so on. You can also sign the <center>...</center> directly with the center link

wonderful!!
<center>
This must is my dream.
</center>
wonderful!!
This must is my dream.



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.