Menu
Is free
check in
the main  /  Problems / Tags physical formatting HTML text. Tags Physical Formatting HTML Text Browsers: Table Mobile

Tags physical formatting of HTML text. Tags Physical Formatting HTML Text Browsers: Table Mobile

HTML Tags and - Substitution and Padded Text

Definition and use

Tag Determines the substitution text. The substitution text has a height of two times less and appears under the baseline. Substational text can be used when writing a chemical formula, for example H 2 O.

Tag Defines the advanced text. Padded text has a height of two times less and appears above the baseline. Padded text can be used when writing footnotes, such as WWW.

Support browsers

Tags and Supported by all major browsers.

Differences between HTML and XHTML

Standard attributes

Column DTD Indicates which type of document HTML 4.01 / XHTML 1.0 DTD is allowed. S \u003d STRICT, T \u003d Transitional and F \u003d Frameset.

Tags and Support the following standard attributes:

Attribute Value Description DTD
class nameKlassa Specifies the name of the class for the element STF.
dir. rTL
LTR.
Specifies the text direction for the contents in the element STF.
id identifier Indicates unique identificator For element STF.
lang. code_ language Specifies the language code for the contents of the item STF.
style. definition_stile Specifies the built-in style for the element STF.
title text Indicates additional information About Element STF.
xML: Lang. code_ language Defines the language code for the contents of the element in the XHTML documents STF.

Additional information about standard attributes.

Attributes of events

Tags and Support the following event attributes:

Attribute Value Description DTD
onClick. script Script, launched when clicking the mouse STF.
ondBlClick. script Script started at double-click Mouse STF.
onmousedown. script Script running when you press the mouse button STF.
onmousemove. script Script running when moving the mouse pointer STF.
onmouseout. script Script, started when the mouse pointer goes beyond the element STF.
onmouseover script Script, started when the mouse pointer moves above the element STF.
onmouseUp. script Script started when releasing the mouse button STF.
oNKEYDOWN. script Script running when you press the key STF.
onKeypress. script Script running when the key is pressed and then released STF.
onKeyup. script Script running when the key is released STF.

Additional information Obo

Tag

Tag Used to indicate the font in the lower case (index). The lower register is the symbols of the reduced size, which are displayed with the displacement down to the rest of the string symbol. Generally, according to the generally accepted definition, the symbols of the lower register should be located below the baseline of the current line, but from all browsers the contents of the container So only Opera displays - the remaining output symbols are slightly higher.

The base line is an imaginary line passing along the lower edge of the characters. Some letters (sh, c, y, d, r, f) partially overlook the baseline.

Attributes

Personal attributes: not.

  • accessKey - Sets the key quick access To focus on the HTML element.
  • class - Specifies the name of the class or tag classes used in CSS (Cascading Style Tables).
  • dIR - indicates the direction of text inside the element.
  • - Specifies the name of the HTML tag identifier, which can be used as an "anchor" or in styles tables.
  • lang - indicates the language on which the text is written inside the HTML element.
  • style - Need to use built-in styles CSS. To tag.
  • tabindex - Sets the procedure for tabs between the elements (Tab key).
  • title - Displays a pop-up hint when hovering the mouse cursor to an HTML element.

Type tag

Purpose: text (lines).

Tag model: inline (built-in, string level).

May contain: Inline tags, ordinary text and hTML Special Mills (mnemonics).

Opening tag: We are necessary. Closing tag: We are necessary.

Syntax

content

An example of HTML: Application of Sub Tag

seodon.ru - Application of Sub

t. n. \u003d N!

We give a description of physical formatting tags. Some of them are not recommended for using the HTML 4.0 specification for the above reasons. Some tags are canceled (deprecate) with HTML 4.0 specification, but they continue to be supported by browsers.

Tag

Tag Displays the text by bold font. In most cases, it is recommended instead of tag use the tag of logical formatting . For example:

it bold font.

Fig. 1.2. Examples of physical text formatting (NetScape browser)

Tag

Tag Displays text in italics. For most cases, instead, the tag is recommended to use tags , , or Because the latter better reflect the appointment of the selected text. For example:

Selection italic

Tag

Tag Displays the text by monoshyry font. For most cases, instead, the tag is better to use tags , or . Example:

it monoshyry font.

Tag

Tag Displays the text underlined. Canceled tag. Instead, it is recommended to use tags or . For example:

Example underlowing text.

Tags and

Tags and Displays the text crossed by the horizontal line. Canceled tag. Instead, you should use a tag . For example:

Example crushed text.

Currently tag not supported by all browsers, so it is recommended to use in combination with tag . Namely, inside the tag container You can attach a couple of tags

....

Tag

Tag Displays the text with a larger font (than the unrefined part of the text) size. Instead this element It is better to use or title tags, for example,

Font more size.

Tag

Tag Displays text with a smaller font. Since HTML does not have a tag opposite by the tag , for these purposes, you can apply a tag . Most browsers support embedded tags However, it is not recommended to use this approach. For example:

Font little size.

Tag

Tag Shifts the text below the row level and displays it (if possible) a smaller font. It is convenient to use for mathematical indexes. For example:

An example of font for nizhny index.

Tag

Tag Shifts the text above the row level and displays it (if possible) a smaller font. It is convenient to use for the task of the degrees of numbers in mathematics. For example:

An example of font for upper index.

Tag

Tag Displays flashing text. This tag is not included in the HTML specification and is supported only by the Netscape browser. Experienced developers are extremely rarely resorted to the use of this tag, since the presence on the flashing characters page annoys many users.

Tag

Tag container is an analogue of the block level tag

. It can be used in cases where you want to mark the text fragment to specify its properties, and it fails to use any other structured formatting tag.

The Microsoft Internet Explorer browser additionally permits the use of the following tag options: Dir, DataFold, DataFormatas, Datasrc. The description of the parameters can be found in the second part of the book.

Fig. 1.3. Using nested text formatting tags

Formatting tags can be invested in each other. At the same time you need to closely monitor that one container is entirely in another container. In fig. 1.3 shows an example of using the hitch element attachments to a bold element. Used the following HTML code fragment:

it bold font.

it italics.

And here the text bold and cursing

Tag

Tag Specifies the font parameters. It refers to the tags of physical formatting of the text level.

The assignment of the font parameters directly in the document text violates the basic idea of \u200b\u200bseparating the meaningful part of the document and describing the document presentation form. Therefore, in the HTML 4.0 specification, this tag, as well as the tag Are attributed to canceled. Their further use is not recommended.

Despite these terrible warnings, apparently, for the simplest documents, physical formatting can be considered permissible. In addition, to start training the basics of formatting is the easiest way from the rules of directly indicating the formats of elements. Before the style of registration, the novice developer should still grow.

Tag refers to serial elements, so it cannot include elements of the block level, for example,

Or

.

The following parameters can be set for the tag: FACE, SIZE and COLOR. Note that the Netscape browser also allows the use of two additional parameters: Point-Size and Weight, which is described.

    The FACE parameter is used to indicate the type of font that the user's viewing program will display the text (if this font is on the computer). The value of this parameter is the name of the font, which must accurately coincide with the font name having a user. If this font is not found, this indication will be ignored and the font set by default will be used.

    You can specify both one and several font names, separating them with commas. This is a very useful property, since in different systems there can be almost identical fonts called differently. Another important quality is to task the preferences of fonts. The list of fonts is visible from left to right. If the user's computer does not have a font specified in the list first, then an attempt is made to find the following font and so on.

    Let us give an example of using the FACE parameter:

    Purpose of fonts

    An example of the task of the font name.

    In fig. 1.4 shows the display of the NetScape browser. In the example, the VERDANA font is indicated as a preferred, with its absence, the ARIAL font will be used and so on.

Fig. 1.4. Netscape browser sample display

    This parameter is used to specify the font size in the conventional units from 1 to 7. The specific font size depends on the viewer used. It is believed that the size of the "normal" font corresponds to the value 3.

The default font size settings, as well as the magnitude of the absolute change in the font size, depend on the browsers. In fig. 1.5 shows the Netscape browser setup window in which the default fonts are specified.

The font size is indicated as an absolute value (Size \u003d 2) and relative (Size \u003d + 1). The last method is often used in combination with the task of the base size of the font using the tag .

Note

When specifying the size of the fonts of the type "2" and "+2" (as opposed to most programming languages \u200b\u200bin which the unary "+" sign can be omitted) give a fundamentally different result.

Let us give an example in which various ways of assigning font sizes are used. The display of the example is shown in Fig. 1.6.

Fig. 1.5. Netscape browser font settings window

Fig. 1.6. Purpose of sizes of fonts

Purpose of sizes of fonts

Font size 1.

Font size 2.

Font size 3.

Font size 4.

Font size 5.

Font size 6.

Font size 7.

    This parameter sets the color of the font, which can be set using standard names or in #rrggBB format. Let us give an example of a document with multi-colored text.

    Choice of color font

    Text green

    Text of red color

Tag

Tag Used to indicate the size, type and color of the font used in the default document. These values \u200b\u200bare required for the entire document, however, can be override with the tag in the right places . After the closing tag Tag action Restores. The values \u200b\u200bof the default font parameters can be repeatedly redefined in the document, i.e. tag It may appear in the document any number of times.

Note

Tag may also appear in the section Document.

Note that for the tag There is no closing tag.

As parameters can be used exactly the same parameters as for the tag , namely: Face, Size and Color. Assignment and rules for recording parameters are similar.

Note

Netscape browser does not allow the use of the Face tag parameter .

Let us give an example of using the tag .

Purpose of sizes of fonts

The text written by default font.

Font size 2.

Font size 4.

Text after Table

In the given example, the font size used by default is overridden. Initially, it is 3 (default). It is then set to 2, then - 4. Note the mapping of this example (Fig. 1.7). It can be seen that for tables purpose tag It does not work. This is typical for many browsers, although formally violates the idea of \u200b\u200bapplying a tag.

Fig. 1.7. Displaying an example with a tag (Netscape browser)

Description

Displays the font as a lower index. The text is located below the baseline of the remaining string symbols and the reduced size.

Syntax

Text

Closing tag

Obligatory.

Attributes

Analog CSS.

Example. Using tag

Tag Sub

Under the action of hydroxylamine aldehydes turn into oximes: 3SNO + NH. 2Oh \u003d ch 3C (\u003d NOH) H + H 2O.

Specification ?

Specification

Each specification passes several stages of approval.

  • Recommendation - Specification Approved W3C and recommended as standard.
  • Candidate Recommendation ( Possible recommendation) - A group responsible for the standard is satisfied as it meets its goals, but the help of the development community to implement the standard is required.
  • Proposed Recommendation ( Offered recommendation) - At this stage, the document is submitted to the W3C advisory board for final approval.
  • Working Draft (Work Project) is a more mature version of the draft after discussion and amendments for consideration by the community.
  • Editor "S Draft ( Editorial Chernovik) - the rough version of the standard after making editors by the project editor.
  • DRAFT ( Chernovik Specification) - The first black version of the standard.

A mansion is the living standard HTML (Living) - it does not adhere to the traditional numbering of versions, since it is in continuous development and updated regularly.

Browsers: Table Mobile ?

Text inside Cell Table
Internet Explorer. Chrome.Opera.Safari.Firefox.
2 1 3.5 1 1
AndroidFirefox Mobile.Opera MobileSafari Mobile
1 1 6 1

Text in the form of the lower and top index:

This Text Contains. subscript. text.

This Text Contains. superScript. text.

Description and use

Tag Defines text as a lower index. The bottom index looks like a symbol under the string. Such text can be used in chemical formulas: H 2 O.

Tag defines text as a top index. The top index looks like a symbol over a string. The upper index can be used for footnotes: www.

The difference between HTML and XHTML

Standard attributes

Event attributes

Attribute Value Description
onClick. script The script will be performed when clicking
ondBlClick. script The script will be completed with double click
onfocus. script The script will be performed when receiving the focus
onmousedown. script The script will be completed when you press the mouse button.
onmousemove. script The script will be executed when the mouse cursor moves
onmouseout. script The script will be executed when the mouse cursor leaves the element limits
onmouseover script The script will be executed when the mouse cursor is above the element
onmouseUp. script The script will be executed when the mouse button will be released.
oNKEYDOWN. script The script will be completed when you press the key.
onKeypress. script The script will be executed when the key is pressed and the subsequent rally
onKeyup. script The script will be executed when the key is switched.