XHTML is a markup language that is used to create web pages. It is a stricter and more modular version of HTML (Hypertext Markup Language) and is based on XML (eXtensible Markup Language).
It is designed to be more machine-readable and compatible with XML-based web applications. It is also designed to be more easily integrated with other XML-based technologies, such as XSLT (eXtensible Stylesheet Language Transformations) and SVG.
Here’s an example of a simple document that contains a “Hello World” heading:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://ww w.w3.org/1999/xhtml">
<head>
<title>Hello, World!</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
In this document, we start with a document type declaration that specifies that we’re using the XHTML 1.0 Strict DTD. We then define an html element with a xmlns attribute that specifies the namespace.
Inside the element, we define a head element with a title element that contains the text “Hello World”. We also define a body element with an h1 element that also contains the text “Hello World”.
To display this document in a web browser, we would typically save the code in a file with the extension .xhtml and open it in a web browser that supports (Extensible Hypertext Markup Language).