|
When a web browser interprets an HTML file it ignores all the normal line breaks and tab
characters in the document treating them as just spaces. It then displays the text ignoring
duplicated spaces wrapping the text wherever necessary to fit the current browser windows width.
The HTML tag to force text to start on the next line is
<br>
Which forces a new <br> line like this
|
Which forces a new line like this
|
To start a new paragraph the HTML tag is
<p>
Which looks like <p> this
|
Which looks like this
|
There are many ways, in HTML, to emphasise sections of text or words.
To make a section of text bold the tag is
<b>
<b> Bold text </b>
|
Bold text
|
To make a section of text italic the tag is
<i>
<i> Italic text </i>
|
Italic text
|
These effects can be combined
<i><b> Bold Italic text </b></i>
|
Bold Italic text
|
It is good practice to always close all tags (even at the end of the document) and to
close the most recently applied tag first i.e. in the example above the most recently applied tag is
the bold tag
so that is closed first
Another useful tag for splitting up sections of text is the horizontal ruler
<hr>
Some text <hr> More text
Some text More text
Text is normally displayed left aligned, it can also be centred
<center>
Note the American spelling
Normal Left Aligned <center> Centred </center> Back to normal
Normal Left Aligned Centred Back to normal
|