Web Tutorials     [RO]  [EN]  
| HOME | Tutorials | News | SERVICES | Directory | Tools | FORUM | About | SITE MAP | CONTACT | SEARCH |
.....................................................
.....................................................
User happy birthdayToday we celebrate one day of birth.
(dannyb0y)
.....................................................
Login
Register
I forgot my password
.....................................................
HangMan Online Game
.....................................................
Online
In total there is
10 visitors online,
of which:
1 invited
9 are bots
.....................................................
Put your ad here
.....................................................
.....................................................
.....................................................
.....................................................
.
Home - Text Formatting

<< Introduction to HTML   -   Creating HTML forms >>
Rate this article(Members only)
1 2 3 4 5
A - A Announced this way the site administrator for any problems observed on this page.  Print this page as PDF  Email  

Text Formatting


Publishing date: 27-01-2011 - Copyright © Catalin Drogoreanu

In HTML the transition to a new row is maked by introducing <br> label (short for row breaks - broken line) and for new paragraph the label <p> (short for Paragraph).
<hr> label (short for horizontal rule - a horizontal rule) introduces a horizontal line and moving to a new row.


Using the appropriate labels the text can be formatted.
For example, they can change for font: size, color, shape (normal, bold, italic), family (Arial,Verdana, etc.), the text can be aligned horizontally or vertically and titles (header), from 1-6, are different in size (the largest one and 6 the lowest).
Labels <div> and </ div> delimit a block (a generic container) for formatting. One is the align attribute of div block which can take values:

  • center - to center alignment
  • left - Align Left
  • right - align right
  • justify - alignment justified at both ends of the page

In a situation where we want the text introduced to be displayed exactly as it has been introduced (preformatated text) in the file source we will use the pair of labels <pre> and </pre> (took the preformatted text).

Example:

HTML Code:What is displayed in the browser:
Normal textNormal text
<b>text bold</b> text bold
<i>text cursive (italic)</i>text cursive (italic)
<u>text (underline)</u>text (underline)
<del>deleted text</del>deleted text
<sup>exponent (superscript)</sup>exponent (superscript)
<sub>indice (subscript)</sub>indice (subscript)
<tt>monospatiate characters (teletype)</tt>monospatiate characters (teletype)
<cite>quote (cite)</cite>quote (cite)
<em>revealed (emphasis)</em>revealed (emphasis)
<code>computer code</code>computer code
<kbd>keyboard</kbd>keyboard
<samp>sample</samp>sample
<strong>Tickened text (strong)</strong>Tickened text (strong)
<big>big text</big>big text
<small>small text</small>small text
<font color="red">red font </font>red font
<font face="Courier">font Courier</font>font Courier
<font size="6">font size=6 </font>font size=6
<div align="center">text aligned center</div>
text aligned center
<div align="left">text aligned left</div>
text aligned left
<div align="right">text aligned right</div>
text aligned right
<h1>Title 1 </h1>

Title 1

<h2>Title 2</h2>

Title 2

<h3>Title 3</h3>

Title 3

<h4>Title 4</h4>

Title 4

<h5>Title 5</h5>
Title 5
<h6>Title 6</h6>
Title 6
Publishing date: 27-01-2011 - Copyright © Catalin Drogoreanu   
Click here if you want to see other articles by the same author
There are no comments on this article. Be the first to say your opinion.

Add a comment on this article (members only - login on the site):
Put your ad here