XHTML basic syntax rules

Source: Internet
Author: User

XHTML basic syntax rules

1. A webpage is also an XHTML document composed of elements. The element defines the structure of text and graphics in the XHTML document. The extension name of the xhtmldocument is usually .html#.htm.

2. The XHTML element is defined using the XHTML tag. Each tag appears in a bunch of angle brackets (<> ).PairedThe first is the start tag (Open tag), and the second is the end tag (closed tag ).

3. In XHTML,RequiredThere is an end tag. A single tag, such as a br, cannot be written
To be written
.

4. Overall structure of the XHTML document:

Title
 
 Document body
5. Add the XHTML document body in .

(1) DefinitionBody title. XHTML provides six elements, h1 ~ H6 to support six levels of body titles. h1 indicates the most important title, and h6 indicates the least important title.

(2) defineSection. Section text is included in

And

Medium

(3)Reference text. Use the blockquote element to define a referenced text block. This element indent a paragraph and make it deviate from the surrounding text.

(4) DefinitionList. Ordered list: Element ol, unordered list: Element ul. The list items are marked with the element li. The WEB browser adds a small dot or square before each list item in the unordered list, and adds an integer before each list item in the ordered list.
Definition list: Element dl. The list items include dt (definition list item name) and dd (definition list item content)

(5) DefinitionPre-Orchestration text. Element pre, which allows the text to be displayed exactly in the browser according to the orchestration format in the source file.

(6) DefinitionPartition BlockText. Element div. In XHTML, div elements are often used together with CSS to process page la S.

(7)Spans multiple characters. Element span. Format some characters.

(8) CreateHyperlink. Element. Syntax format:

Another role of Element a is to create an "anchor"

(9) display on the webpageImage. The img element. Syntax format:

(10) insertMultimediaInformation. Element object

(11) insertTableData. Element table tr td, used for table

Mark to define, a table uses Mark as divided into rows, each row uses
Tag to be divided into data units.

(12) on the webpageInsert other webpages. Element iframe.

<Iframe src = "URL" width = "x" height = "x" scrolling = "[auto | yes | no]" frameborder = "0 | 1" name = "internal framework </iframe>
     
6. XHTML elements are divided into block-level elements and embedded elements,Block-level elementsThe defined text is a line feed,Embedded ElementThe defined text does not wrap.

Block-level elements: div, blockquote, list elements (ol ul dl), fieldset, form, h1-h6, hr, p, pre, table, etc.

Embedded elements: span, a, img, label, all form input elements, iframe, object, etc.

Related Article

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.