Tuesday, 28 June, 2022

webmastertools4u

Webmaster Tools

single post

  • Home
  • Text formatting
HTML

Text formatting

HTML tags to manipulate your text
 


 

You can not only put the text into paragraphs but also use different text formatting. All text formatting commands have opening and closing tags. There are three major text styles: bolditalic and underlined. Three HTML tags for every style would be: B, I and U:

 

Opening tag

Closing tag

Example

<B>

</B>

This text is bold. It’s easy to see it

<I>

</I>

This text is italic

<U>

</U>

Underlined text

 

Font changing

To change the font size and color we use the following tag: <FONT>, and close it with the closing tag: </FONT>. The basic attributes of the command are:

 

HTML command

Short description

Examples

<FONT FACE=”Font”> text </FONT>

Text will be the same as the specified font in the tag, if the font is installed on users computer.

Courier, Arial

<FONT COLOR=”#000000″> text </FONT>

Text is depicted in color, specified with the hexidecimal value or color name.

yellow=”ffff00″,
green=”008000″,
red=”ff0000″

<FONT SIZE=”size”> text </FONT>

Specifies the letter size. Allowed digits: from 1 to 7. The size can be specified relatively: -3, -2, -1, +1, +2, +3 – says how the letter size should change in comparison with the ones we are using.

three,
five,
seven

 

Important. There will be no effect, if the specified font is not installed on the user’s computer.

You can use the SIZE, FACE and COLOR declarations inside the same tag, and close with only one tag: <FONT SIZE=”5″ FACE=”Arial” COLOR=”#008000″>Size 5 green text with Arial font</FONT> gives us:

Size 5 green text with Arial font

We can specify the font for a whole document text, except the text specified with the tag <FONT>. This is done with the <BASEFONT> command without the closing tag. The attributes for this command are the same as for the <FONT> command.

Logical formats

Real view of the text between the following tags may differ depending on the computer and the browser.

 

Command

Explanation

Example

<CITE> text </CITE>

This command is used for the text citation. Usually text appears in italic.

“Text citation”

<EM> text </EM>

Analogy to polygraphic italic. Usually text appears in italic.

typographic emphasis

<KBD> text </KBD>

For the text that is written or obtained from the user’s keyboard. Usually text appears in monospace font.

Keyboard - monospace font

<STRONG> text </STRONG>

Analogy to bold polygraphic italic. Usually text appears in bold.

strong typographic emphasis

<VAR> text </VAR>

Usually specifies the variable name. Usually text appears in italic.

Variable names

 

Physical formats

The following are text formatting commands that don’t depend on the browser. <B><I> and <U> also belong to those.

  • <BIG> text </BIG> – text will be a little bit bigger than the other text.

  • <BLINK> text </BLINK> – text should blink. Does it? If not, it means that your browser “doesn’t understand” this command.

  • <SMALL> text </SMALL> – text becomes a little bit smaller than the other text.

  • <STRIKE> text </STRIKE> – text will be struck, like the incorrect word in the text…

  • <SUB> text </SUB> – text will be a little bit lower and smaller than the other text.

  • <SUP> text </SUP> – text will be a little bit higher and smaller than the other text.

  • <TT> text </TT> – typewriter style text – fixed-width typewriter font.

Well, lets go to the next tutorial Text grouping.

Recent Comments

No comments to show.

Archives

Categories