Does anyone know if I can head directly for XHTML without learning HTML?
Is there a difference?

Dani AI

Generated

A short, practical update to this 2008 thread: you can try learning XHTML first, but the clearer and more useful route today is to learn modern HTML (HTML5) first, then pick up stricter XML/XHTML rules if you need them. The replies from , , and made the right points about learning fundamentals and not relying on WYSIWYG tools — below is a current, hands-on plan.

XHTML is an XML application (well-formedness, stricter syntax, and the XML parsing model). That mattered historically because serving XHTML as XML required different handling than serving HTML. The web moved toward the HTML living standard, which is forgiving by design and adds semantic elements and modern APIs. See MDN: XHTML and the HTML living standard for details.

A short learning workflow:

  • Start by making tiny pages and opening them in a browser. Inspect with DevTools to see how markup maps to rendering.
  • Validate early and often with the Nu HTML Checker to catch structural mistakes.
  • Build three small projects: a simple landing page, a form with labels and validation, and an article page using semantic tags.
  • Use a code-first editor (plain text or a lightweight IDE). Reserve WYSIWYG for layout experiments once you understand the markup.

A minimal HTML5 starter template to paste and experiment with:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Practice</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
  <main>
    <h1>Try this</h1>
    <p>Modify and reload.</p>
  </main>
</body>
</html>

For learning resources and validators use MDN: Introduction to HTML and the Nu HTML Checker. If XML workflows or strict parsing are required later, then study XHTML after you have a solid HTML5 foundation.

Recommended Answers

All 6 Replies

Since XHTML is based on HTML, it would make far more sense to learn HTML first. Once you've gotten grounded in HTML, the transition to XHTML will be easy.

You could actually get away with it, they basically exactly the same except that XHTML is stricter -nesting, lowercase etc. I'd say go for it. No harm in cleaning good clean coding habits.

thanks, and besides dreamweaver, what do you guys think is or are good for a beginner to acquire the whole the thing of html, xhtml, dhtml?

Forget Dreamweaver until you learn HTML. The WYSIWYG editors hide the tags from you and you'll never learn anything that way.
I use HTML Kit, but there are many capable, free editors that will get you started.

First things first.

Dreamweaver or any WYSISYG editor for that matter is not a tool that is supposed to be found in every web designers arsenal. My advice is that once you have properly learned the language go for hand-coding, ie use the plain old notepad.

However it is wrong to assume that you will never learn the language properly if you use a WYSIWYG editor. All the WYSIWYG editor like Dreamweaver does is to give you a DESIGNER/CODER view of your website. If you are the one who like to pick and drop things without caring for the semantics then I suggest you to switch to designers view. If you are the one who cares about semantics then I suggest you to switch to the coders view in Dreamweaver.

Here is a good place to start learning HTML/CSS.

Yep, great advise from all the above!

Although it is practically the same thing, you are better-of learning xhtml over html... The idea behind xhtml is to force programmers to write healthier code (to save you the long story).

Using a WYSISYG editor for (x)html in this case, is very much like learning a new programming language using an IDE, you rather using a basic editor because you use "trial and error" method to learn which helps you see the bigger picture better. Once you've got the hang of what you are doing, then you can move up to WYSISYG editors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.