Study Notes for the HTML & XHTML authoritative guide 02-Chapter 4. Text Basics

Source: Internet
Author: User

4.1

partial tags
the document can be divided into several independent and different parts.
attribute:
align attribute
-- specify the left-aligned left, right-aligned right, and Center for the document content contained in the tag, or the two ends are aligned (justify ).
nowrap attribute
-- only Internet Explorer and opera are supported. Firefox and nstscape are not supported. It removes the Text wrap function in some sections.
Dir and Lang attributes
-- display direction and language
ID attributes
-- you can use this value to explicitly reference a part of the document. The name of the ID attribute must be different from that of all other style IDs in the current document.
title attribute
-- like the ID attribute, the title attribute can be used together with almost any other tag. The title attribute to add a description phrase to the Document section.
class and style attributes
-- style: Create the inline style of the label. Class applies the class style pre-defined for the
label to the content contained in the label.
event attributes
(onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onclick, onmouseup, ondbclick, onkeypress)
-- by setting the corresponding attribute to "on", you can respond to those events.
4.2

label
indicates the beginning of a paragraph. Defines the paragraph of a text.

is generally omitted in HTML.
attributes:
align, Dir, Lang, class, ID, style, title, event attributes (onkeyup, onmousedown, onmousemove, onmouseout,

Onmouseover, onclick, onmouseup, ondbclick, onkeypress ).
Permitted paragraph content:
Text, punctuation, link <A>, image , line feed <br>, font changes <B> <I> <tt> <u> <strike> <big> <small> <sup> <sub> <font> and content-based

<Acronym> <cite> <code> <dfn> <em> <KBD> <SAMP> <strong> <var>.

4.3 title Indicates the priority from Attribute:
Align, Dir, Lang, class, ID, style, title, event attributes (onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onclick,

Onmouseup, ondbclick, onkeypress)
 
4.4 Content-based style labels
<Abbr> label
Indicates that the text it contains is an abbreviation of a longer word or phrase.
<Acronym> label
Indicates that the text it contains is an acronym.
<Cite> label
Indicates that the text it contains is a reference to a reference. In italic.
<Code> tag
The text is displayed in an equal-width font (courier.
<Dfn> label
Can Mark definitions of special terms or phrases. In italics.
<Em> tag
Tell the client browser to express the text contained in the content as emphasized content.
Skills are also required to emphasize in the text. If you emphasize too little, some important phrases will be missed. If you emphasize too much, you cannot really highlight the important part. This

Like condiments, it is best not to abuse them.
<KBD> label
It is used to indicate the input from the keyboard, and to type.
<SAMP> tag
A text character that the user has no other interpretations.
<Strong> label
Like <em>, it plays a more important role. It is usually in bold.
<Var> label
Indicates the name of the variable or the value provided by the user.

4.5 physical style labels
<B> label
Is the physical version of the <strong> label. It has no meaning of expansion. It is displayed in bold.
<I> label
Is the physical version of the <em> tag. Italics.
<S> label
Is the abbreviation of the <strike> label. IE is not recommended.
<U> label
The content is underlined. IE is not recommended.
<Big> label
The font to enlarge is used. The text in the text will be larger than other text fonts. Can be nested, each label is bigger than the number of the outside until the maximum is 7

Font.
<Small> label
The same as the big label, the font will be reduced.
<Blink> label
The text is displayed as a flash. IE does not support this label. Avoid using this label.
<Strike> label
There will be strikethrough. It is not recommended.
<Sub> tag
Convert the text into a subscript.
<Sup> label
Convert the text to the upper mark.
<Tt> tag
It works in the same way as the <code> and <KBD> labels. <Tt> indicates an equal-width font.

Style labels can be used in combination. But do not assume that all these combinations are symmetric and available.

4.6 precise spacing and Layout
<Br> tag
In HTML, there is no end tag; in XHTML, put the end tag in the start tag, that is, <br/>. Used for line feed.
Clear attribute: output text when the specified boundary does not have an image.
Class, ID, style, and title attributes.

<Nobr> tag
Create a text area without line breaks.
In standard HTML and XHTML, the method to ensure that the text can be completely displayed by the browser is to include them in the <PRE> label, and then manually arrange the format. Now

In addition to the <PRE> option, the <nobr> tag is available in the browser.
 
<WBR> tag
Defines the line feed that should appear when needed.
Extensions provided by IE are not supported by other browsers. It only works in the <nobr> label and only works when the current window is exceeded by the browser.

Will wrap.
 
<PRE> label
Output A text block without any format.
One of its common applications is to represent computers.Source code.
All tabs are 8 characters long. But it is not recommended because the tab implementation varies with different browsers. Space should be used to ensure the same

Horizontal position.
 
<Center> label
It is not recommended. The content is arranged horizontally in the browser.

<Listing>, <XMP>, and <plaintext> labels are outdated.

4.7 Quick Reference
<BLOCKQUOTE> tag
Define a quick reference. Block references have their own space.
All the text between the labels is separated from the regular document. It is often indented on both sides of the document and sometimes italic.

<Q> tag
Define a short reference.
 
4.8 address
<Address> tag
Tell the browser that the text indicates a contact address, which is generally a normal email or email. It may also contain other information.
All popular browsers display the address subject in italics by default.
 
Special Character 4.9
To include a special character in a document, you must add the standard Object Name or the "#" symbol of the character to the position number of the character in the Latin-1 standard character set, and

There is no space in the middle of a semicolon. For example:
If a & gt; B, then T = 0
If a & #62; B, then T = 0
Both instances will display the following text:
If A> B, then T = 0

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.