HTML Beginner's Guide (2)

Source: Internet
Author: User
Tags contains header html tags window
A Beginner's teaching tool
To see the original file of the information displayed in your browser's current window, you can select the View Source (or equivalent action) option in the browser menu. The contents of the file and all the HTML tags are displayed in a new window.

This is a very good way to learn to use HTML and to master techniques and constructs. Of course, the HTML you see is not necessarily technically correct. When you are familiar with HTML and see a lot of references in this area, you will be able to distinguish between "good" and "bad" html.

Remember that you can save HTML-encoded source files, use them as templates for your Web pages, or modify them for other purposes.

HTML markup
Html
This element indicates that your file contains html-encoded information. The file name extension. HTML also indicates that the file is an HTML document and must be used. (If your system is subject to a 8.3 filename (such as., leehome.htm), you can use the. htm extension.)

Head
The header element head is the first part of your html-encoded document that contains title titles. The title is displayed as part of your browser window (see below).

TITLE
Title Title element contains your document title and identifies its contents as a global context. Headings are usually displayed somewhere in the browser window (usually at the top), not in the text area. The title is also used for the display of the Hotspot list hotlist or the bookmark list, so the title choice is descriptive, unique, and relatively concise. The title is also used to search for servers in the WAIS service.

For example, you might include a short book title in the content of a chapter: NCSA Mosaic Guide (Windows): Installation. This title describes the name of the software, uses the platform, and the contents of this chapter, rather than simply refer to the document as an installation. Much better. Generally your title should be no more than 64 characters.

Body
The second and largest part of the HTML document is the body, which contains the contents of your document (displayed in the text area of your browser window). The tags described below are used within the body of the HTML document.

Title Font headings
HTML has six-level header fonts, numbered from 1 to 6, and 1th is the smallest. Title fonts are larger or thicker than normal text fonts. The first heading font in each document should be marked as <H1>.

The syntax for the title FONT element is:
<Hy> Title Font Text </Hy>
Where Y is a number from 1 to 6, indicating the rank of the title font.

Do not jump in your document using the title font level. For example, do not start with a first-level heading (<H1>), and then follow a level three heading (<H3>).

Paragraph paragraphs
Unlike documents in a multiple-digit processor, wrapping in an HTML file is not important. You don't have to worry about the length of the line in your text (preferably not more than 72 characters, of course). You can use line wrapping anywhere in your source file, and multiple blanks are overlapped in your browser as a blank.

The first paragraph in the example given in the "minimal HTML document" is encoded as

<p>welcome to the world of HTML.
This is the paragraph.
While short it is
Still a paragraph!</p>

There is a line break between the lines in the source file. The Web browser ignores these line wraps and starts a new paragraph only if you encounter another <p> tag <P>

Important: You must use the <P> element to specify the paragraph. The browser ignores any indentation or blank lines in the source file. If there is no <P> element, the document will be treated as a large paragraph. (An exception is to mark the text as "preformatted," as described below.) For example, the output of the following content is exactly the same as the first HTML example:

The paragraph. While short it is still a
paragraph! </P> <p>and This is the second paragraph.</p>

To keep the HTML file readable, the title font should be exclusive, one to two lines before starting a new section, and a blank line between the paragraphs (except for the <P> tag). These additional blanks will be useful when you edit the file (but your browser will ignore the blanks because it has its own rules about whitespace that do not depend on the blank space in your source file).

Note: The end tag </P> can be omitted. This is because when a browser encounters a <P> tag, it thinks the previous paragraph ends here.

Using the <P> and </P> as a paragraph mark allows you to center a paragraph by using the Align=alignment property in the source file.

<p align=center>
This is a centered paragraph. [See the output form below]
</P>

This is a centered paragraph.

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.