Home » Hosting Encyclopedia » XHTML Script

XHTML Script

Basically, XHTML is HTML defined and executed as XML. XHTML is written in similar to the HTML syntax, but stricter. XHTML combines the advantages of both XML and HTML, it’s supported by the majority of browsers and editors. The XHTML script is an extended version of HTML, which was introduced in 2000 to improve HTML’s flexibility and compatibility with other formats. However, there are some differences between the HTML and XHTML syntax and the way some other scripts are processed in XHTML (for example, CSS and JavaScript, due to the case-sensitivity of XHTML). To make sure that the XHTML script is always properly executed and available for all browsers, some developers use only HTML-compatible XHTML.

 

Strict & Transitional XHTML DTD

There are two basic XHTML DOCTYPE versions that are most commonly used for the creation of XHTML documents. These are the Strict and Transitional XHTML DTDs. The Strict XHTML is the standard one, it requires separate structure and presentation (no layout defining markup, the whole presentation should be in CSS). The Transitional XHTML DTDincludes the presentation elements, it’s somewhere between the HTML and the Strict XHTML format. The Strict version is cleaner and the better long-time choice, but if your site visitors use older browsers and you don’t use much CSS, you may also use the Transitional XHTML DTD.

 

Valid XHTML and XHTML Syntax

If you want to write valid XHTMLscript you must observe a few rules. Unlike HTML, XHTML elements must be always closed, with closing XHTML tags (“<“p> and “<“/p>) or single self-closing XHTML tags (“<“/hr>). XHTML is case-sensitive, so the elements and attributes must be in lowercase. Unlike the HTML markup, XHTML attribute values must be always quoted. Attribute minimization or “short tags” isn’t allowed for XHTML. It’s absolutely necessary to define the XHTML DOCTYPE in the beginning of the document. These are the basic requirements. However, there are some parsing errors that might occur for XHTML files, so you should be always careful and make sure that you use valid XHTML script.

Was this article useful?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Newest Articles:

Second Level Domain (SLD)

The Second Level Domain or SLD is an essential part of the hierarchical Domain Name System. It is the second part of the full domain name after the Top Level Domain, on its left side. The Second Level Domain is often the same as the website name, the company or the...

Top-Level Domain (TLD)

The Top Level Domain name (TLD) is the last or right-most fragment of the domain name. The parts of the domain name are separated with dots and form their own hierarchy in the Domain Name System (DNS). There is a Top-Leveл Domain list where you can see all available...

IANA

What is IANA? Although the Internet is not really a centralized system, there are some key infrastructure elements that need to be coordinated. The Internet Assigned Numbers Authority (IANA) is an organization that was founded in 1988 by the government of the U.S.A....

ICANN

What is ICANN? ICANN is an abbreviation from Internet Corporation for Assigned Names and Numbers. It is the non-profit organization that’s responsible for the assignment and coordination of unique Internet addresses and names for all devices connected to the Internet,...

Domain Parking

Domain parking refers to the process of buying a domain name, but still not using it – the period before the website is uploaded or after the domain expired and the website’s been deleted and there’s no content on that address, only one blank or a placeholder page....

Ready to Create Your Website?