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.)
The Ask an IPL Librarian Reference Service will close between academic terms beginning December 20, 2007 at 10 p.m. (EST). We will reopen the service on Monday, January 5, 2008 at Noon (EST). We use this time to work behind the scenes to improve this service. Happy Holidays from all of us at the IPL!

Nesting Tags

Okay, now that you know how to use several different tags, I need to tell you about nesting. Nesting means that when you put several pairs of tags into a document, you must balance each pair of tags, making sure they do not overlap. It is easiest to understand with an example. So here is an example using the emphasis or italics tags, <em></em>, and the strong or bold tags, <strong></strong>:

Incorrect:
<strong> <em> </strong> </em> red left arrow this end tag is misplaced

Correct:
<strong> <em> </em> </strong>

If you have overlapping tags, then your document will be displayed by the web browser in ways you didn't expect.

Let me give you a more complicated example because this nesting thing is really important. Trust me, it can cause you some major problems later on when you start filling up your document with a whole lot of tags…

Incorrect:
<tag 1>
<tag 2>
<tag 3>
</tag 2>
</tag 3>red left arrow this end tag is overlapping
</tag 1>
Correct:
<tag 1>
<tag 2>
<tag 3>
</tag 3>
</tag 2>
</tag 1>

As you can see in the second example, you need to put </tag 3> before you put </tag 2>.

Got it? Hope so, because I am ready to start showing you some more cool things that you can do with your text. right arrow

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

Updated on 28 Nov 2006

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.
© 2008, Drexel University, All Rights Reserved