You are here:    Home » KidSpace » Learning HTML

KidSpace Home

Ask an IPL Librarian

Librarians' Internet Index

Library Locator

Subjects

Reference
The World
Computers
Health & Nutrition
Reading Zone
Math & Science
Art & Music
Sports & Rec.
Fun Stuff

Features

Science Fair
Stately Knowledge
Learning HTML
Orca Search
Poison Prevention
Author Page
Culture Quest
Story Hour
Say Hello
U.S. Presidents

Valid XHTML 1.0 Transitional

Valid CSS!

Ask an IPL Librarian
Have a question? Ask an IPL Librarian!
(Use our Contact Us form for questions/suggestions about our site.)

Format Tags

To get blank lines and blank spaces to show up in your web browser, there are a few tags that will do that trick.

If you want to start a new line, simply use a line break tag, <br />.

<html>

<head>
<title> Learning HTML </title>
</head>

<body>
Woo-Hoo! <br /> I'm <br /> learning <br /> HTML!
</body>

</html>

If you want to start a new line and skip a line, you need to use the paragraph tags, <p></p>.

Most HTML tags are used in pairs, as we've seen with these tags, <html></html>, <head></head>, <title></title>, and <body></body>. Each of these tag pairs always have an opening tag and a closing tag, and the closing tag always has a /, or slash, in it.

HTML tags that aren't used in pairs, like <br />, have the /, or slash, in them right before the > symbol.

Paragraph tags, or <p></p>, tell your internet browser to put a blank line before and after the text that you put between the paragraph tags. Whenever you want text to appear with a new line before and after it, you need to enclose that text in paragraph tags. Here's an example.

<html>

<head>
<title> Learning HTML </title>
</head>

<body>
Woo-Hoo! <p>I'm</p> <p>learning</p> <p>HTML!</p> Am I
having fun?
I sure am!
</body>

</html>

To make more than one space between letters, you must use &nbsp; tag, which is called the non-breaking space tag. Notice that this tag does not need the angle brackets and it does not need an ending tag. This tag is a special tag because it starts with & (ampersand) and ends with ; (semicolon). In other words, the & tells the web browser that we are beginning a special character and the ; tells the web browser that we are ending a special character. What about the letters in-between? Well those letters are sort of an abbreviation for what the tag is telling the web browser to do. In this case it is telling the web browser to display an extra blank space. There are lots more of these special characters of which you should be aware.

Here is an example using the &nbsp; tag:

<html>

<head>
<title> Learning HTML </title>
</head>

<body>
Woo-Hoo! &nbsp; I'm &nbsp; &nbsp; learning &nbsp; &nbsp; &nbsp; HTML!
</body>

</html>

Things look a bit confusing right now? Relax and just try playing around with the various tags. Don't worry about messing things up. I remember when I first started learning HTML. Boy, did I mess up my display! But hey, I sure did learn from my mistakes.

Finally, I want to let you know another way of breaking up your display beyond using the the line break tag, <br />, and the paragraph tags, <p></p>. What I am talking about is the horizontal rule tag, <hr />, which will insert a horizontal line on your web page.

<html>

<head>
<title> Learning HTML </title>
</head>

<body>
Woo-Hoo! <hr /> I'm learning HTML!
</body>

</html>

Wow! You have just learned a whole lot of new tags. However, there are still many more left for you to learn. Come on! Let's keep going and I will show you some really cool stuff to do to your text! right arrow

This resource originally created by Deborah Dunk.
Revised and edited by Michael Galloway in 2005 & in 2006.

Updated on 11 Jun 2009

What is the IPL?

The Internet Public Library is a public library for the world wide web.
Students from a consortium of colleges and universities with programs in information science develop and maintain the IPL!
Here are some of the partners in the IPL Consortium. A complete list is found on the IPL Consortium page.

The iSchool at Drexel Florida State University College of Information University of Illinois at Urbana-Champaign Graduate School of Library and Information Science Rutgers School of Communication and Information Studies

University of North Carolina at Chapel Hill School of Information and Library Science University of Pittsburgh School of Information Sciences Syracuse University School of Information The Information School - University Of Washington

The Internet Public Library is hosted by The iSchool at Drexel, College of Information Science and Technology,
with major support from the College of Information at Florida State University.

 
© 1995-2008 The Regents of the University of Michigan. All rights reserved.
© 2009, Drexel University, All Rights Reserved