Free Tutorials | Certifications | Definitions | LearnthatQuick | ExplainThat | Links | Forums  
Learnthat.com Free Certification and Computer Online Courses
HomeFree Online Courses and TutorialsLearnthat.com Certification ResourcesWhat is definitions, Define technical termsFree Tutorial Links and Resources
  Home: Online Courses: Web Development: Differences Between HTML and XHTML

Learning XHTML: Differences Between XHTML and HTML

In the first section of this tutorial, we learned a few differences you must learn when writing XHTML:

  • XHTML tags must be closed
  • XHTML documents must be "well written"
  • XHTML tags must be in lowercase characters

XHTML tags must be closed

The first major differences between XHTML and HTML is the fact tags must be closed. What do we mean?

In HTML, this could be a structure of your document:

<html>
<head>
</head>
<body>
<p>Hey there. I am your <b>instructor for this course</b>.<br>
This will be a great course!
<p>This course will focus on XHTML.
<p>Thanks for taking our course.
</body>
</html>

In XHTML, you must close each of your <p> tags and you must close the <br> tag. In normal HTML, you can close the <p> tag with </p>, however, since there is no "close" tag for <br>, you can close it in XHTML by using <br />. Older browsers will ignore everything after the space in <br />.

XHTML Documents must be well written

Currently, browsers forgive most of your mistakes in writing your code. In XHTML, however, you must keep your documents well formed and well written. When you are creating a web page, you need to keep elements within their proper structure. For example:

<html>
<head>
</head>
<body>
</body>
</html>

is the proper structure of webpage.

XHTML Tags must be written in lower case

XHTML is a form of XML. XML considers lower and upper case to be different characters and different tags. In XHTML documents, you must use lower case characters for all tags.

<P><B>Hi there, this is a test.</B></P>

is incorrect. The correct code would be written:

<p><b>Hi there, this is a test.</b></p>

 

XHTML is a new way to write your HTML and the preferred method for web development. Find more web development tutorials here.

More Resources

Check out the Learnthat.com free tutorials and resources links section for XHTML. Our links section has hundreds of free tutorials, practice exams, and resources in a variety of topics.

 

 

 

 
Popular Tutorials

Discuss this page in our Free Discussion Forums
Discussion Forum

 

 

More Certification Tutorials

Network+ Certification Tutorial
Network+, a CompTIA industry neutral networking certification is very popular among networking professionals and companies. Learn the concepts you need for this certification!

[+] MORE CERTIFICATION TUTORIALS

certification online classes courses get certified

More Lifestyle Tutorials

Microsoft Word XP
Learnthat.com's free Microsoft Word 2002 online courses. Learn the basics for using this popular word processing software package.

A+ certification free resources and online courses
All Learnthat.com Courses & Tutorials

All Courses All Courses

Money & Financial courses Money & Financial
Business Tutorials Business Courses New courses & tutorials New Tutorials
Computer Courses Computer Courses New courses & tutorials Software Help
Fun Tutorials Fun Tutorials Web Design Courses Web Design Tutorials
Home & Garden Tutorials Home & Garden Basic Windows Tutorials Windows Tutorials
Lifestyle and Family tutorials Lifestyle Tutorials Submit a Tutorial Submit a Tutorial
A+ Certification

 

Learn: Free Tutorials - LearnthatQuick - Links to Free Tutorials
Understand: Free Technical Definitions - ExplainThat Whitepapers
Use: Certification Section - Discussion Forum

Visit Our Friends: DefineThat.com Technical Defintions - Romancetips.com - Free Gift Ideas - GiveThat

About Us : Contact Us : Advertise : Privacy Information

© 1998-2003 Learnthat.com