Web zagzag.tk

    
 

 

Welcome In HTML Course:-

 Back To Basics index

2-Editing HTML

Now, open your first HTML file in Notepad again. This time, add a couple returns after "Regular Text" so it looks like this:

<html>
<head>
<title>My First Page</title>
</head>

<body>
Regular Text 

<b>Bold Text</b>
</body>
</html>

To a first time user, it would seem like now there should be a space between "Regular Text" and "Bold Text" when you view this file in your browser. But this is not the case. Web browsers do not care how many spaces are in your HTML file, you must use commands to change the text in any way.

To put these two phrases on different lines, we need to use the <p> (paragraph command).

<html>
<head>
<title>My First Page</title>
</head>

<body>
<p>Regular Text</p> 
<p><b>Bold Text</b></p>
</body>
</html>

Now your web page will look as follows:

Regular Text

Bold Text

You can also make the paragraph be centered in the window by using <p align="center"> instead of <p>. Or you can right justify a paragraph by using <p align="right">.

What if you do not want a space between the two lines, like using <p> does, you must use the <br> (break) tag. Example:

<html>
<head>
<title>My First Page</title>
</head>

<body>
<p align="center">Regular Text<br> 
<b>Bold Text</b></p>
</body>
</html>

This will give you a page that look like the following:

Regular Text
Bold Text

These are just a few of the many tags used in HTML.

NEXT: Learn about adding color to your web pages.
Back To Basics index

     



Copyright © [2006 - 2007] [Eagles Group]. All rights reserved