RE: Malware and Threads
December 18, 2012 at 9:46 am
(This post was last modified: December 18, 2012 at 9:48 am by Tiberius.)
No, XHTML is actually more accurately defined as both XML and HTML. It uses XML structure, but HTML elements. In XML, you can have any tag as a root node; in XHTML, you have to use <html>, for instance.
You can create new elements in XHTML, but it isn't recommended, and is not really supported in browsers unless you supply your own definitions for those elements. I know a lot about XHTML; I've coded in it for years. It loads faster because browsers can use XML parsers rather than HTML parsers, which require more checks, but it's no different in terms of what you can do, and these days the speed is probably not even noticeable by the average user anyway.
Going by the first line, one would assume it is just XML, sure. However, if you look down a few lines more, you'll find that it is obviously HTML as well:
The DOCTYPE is "html", and more specifically "XHTML Transitional". The first tag (the root tag) is <html>. The next tag opens up a HTML header (<head>) which contains <script> tags (HTML specific) and <meta> tags (HTML specific). Indeed, the <meta> tag even lists the "Content-Type" as "text/html".
XHTML is a type of HTML as much as it is a type of XML. Effectively, it is the HTML language in an XML format.
You can create new elements in XHTML, but it isn't recommended, and is not really supported in browsers unless you supply your own definitions for those elements. I know a lot about XHTML; I've coded in it for years. It loads faster because browsers can use XML parsers rather than HTML parsers, which require more checks, but it's no different in terms of what you can do, and these days the speed is probably not even noticeable by the average user anyway.
Going by the first line, one would assume it is just XML, sure. However, if you look down a few lines more, you'll find that it is obviously HTML as well:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://gmpg.org/xfn/11">
<script type="text/javascript" src="/noframes.js" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
The DOCTYPE is "html", and more specifically "XHTML Transitional". The first tag (the root tag) is <html>. The next tag opens up a HTML header (<head>) which contains <script> tags (HTML specific) and <meta> tags (HTML specific). Indeed, the <meta> tag even lists the "Content-Type" as "text/html".
XHTML is a type of HTML as much as it is a type of XML. Effectively, it is the HTML language in an XML format.