HTML basics: basic structure of HTML _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
The basic structure of HTML hypertext document is divided into two parts: the document header and the document body. In the document header, some necessary definitions are made for this document. The document body is the information of various documents to be displayed. & Lt; HTML & gt; & lt; HEAD & gt; header information & lt; HEAD & gt; & lt; BODY & gt; basic structure of the HTML document
The document header and the document body are divided into two parts. In the document header, some necessary definitions are made for this document. Only the document information to be displayed is displayed in the document body.

   
Header message
   
   
Main text file, positive text score
   

WhereIn the outermost layer, the content of the pair is an HTML file. We will also see some Hompage omissionsNote: Because the .html or .htm file is regarded as an HTML document by the Web browser by default.Including the document header information, such as the document title. If you do not need the header information, you can omit this mark.Mark is generally not omitted, indicating the beginning of the body content.
Below is the source code of a basic hypertext document:

A simple HTML example



Welcome to my homepage




This is my first home page. I will try my best no matter what the situation is!




Zookeeper
Ghost File Header
Zookeeper
Zookeeper
Bytes
Bytes
Bytes
Upload File body
Bytes
Bytes
Bytes
Bytes
Zookeeper
Tags in hypertext
The biggest obstacle we encountered when we were just getting into hypertext was some sentences enclosed by "<" and ">". We call it a tag and an element used to separate and Mark text, to form a text layout, text format and colorful pictures.
1. Single tag
Some tags are called "single tags" because they can be fully expressed by being used independently. The syntax for such tags is:
<Tag Name>
The most common single tag is
, Which indicates line feed.
2. Dual tags
Another type of tag is called "dual tag". It consists of "start tag" and "end tag" and must be used in pairs, the start tag tells the Web browser to start executing the function indicated by this tag, and the end tag tells the Web browser to end the function here. Add a slash (/) before the start tag to become the end tag. Syntax:
              <标签> Internal capacity
The content part is the part to be applied to the tag. For example, if you want to highlight a text segment, place it in Marking:
               First:
3. tag attributes
Many single-tag and double-tag start tags can contain some attributes. The syntax is:
<Tag Name attribute 1 attribute 2 attribute 3... >
There is no order between each attribute, and the attribute can also be omitted (take the default value). For example, a single mark indicates to draw a horizontal line (horizontal line) at the current position of the document ), generally, the leftmost end of the current row in the window is always painted to the rightmost end. With some attributes:
The SIZE attribute defines the line width, and the attribute value is an integer. The missing value is 1. The ALIGN attribute indicates the alignment mode. You can choose LEFT (LEFT alignment, default value), CENTER (CENTER ), RIGHT (RIGHT alignment); the WIDTH attribute defines the length of the Line, which can be a relative value (the percentage enclosed by a pair of "signs, indicating the percentage relative to the full window ), you can also obtain the absolute value (the number of screen pixels, such as WIDTH = 300). The default value is "100% ".

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.