What is XHTML with Example | XHTML vs HTML
What is XHTML
Hello friends! Today in this post we will read about What is XHTML in Hindi ( What is XHTML ?). It has been written in very simple language. Read it completely, you will understand it easily. So let’s start:-
Topics
1 XHTML – What is XHTML?
2 Advantages of XHTML
3 Disadvantages of XHTML – Its disadvantages
4 XHTML Example –
5 Difference between HTML and XHTML
6 Features of XHTML – Features of XHTML
What is XHTML:-
The full name of XHTML is EXtensible Hyper Text Markup Language.
It is a markup language that is almost similar to HTML. This language is defined as XML application.
In other words, “It is a markup language which is used to create web pages. All browsers support this language.”
This language was invented by W3C (World Wide Web Consortium) on January 26, 2000. With the help of this language, any developer can convert HTML file into XML.
This language is more strict than HTML. That is, in HTML we can write tags in both lower case or upper case, but in XHTML we can write tags only in lower case.
The syntax of XHTML is quite complex due to which it becomes difficult for any user to learn this language.
It contains many types of tags using which we can easily create our web page.
By using this language we can create a beautiful and attractive web page or website. This language supports SVG (Scalable Vector Graphics). It is easy to convert the code of this language into PDF, RSS, and RFT.
Advantages of XHTML:-
It has many benefits which are given below:-
1- The size of the code written in XHTML is very small, hence less memory is required to store it.
2- Its codes are very clean because closing tag has to be used in it.
3- Search engines (like Google, Yahoo) can easily search the code written in XHTML. Due to which the ranking of the website increases.
4- The website created by it loads and opens very fast.
5- Xhtml page is easier to access than HTML.
6- If the user uses this language then he can reuse its code.
7- It is compatible with various devices.
8- It is easy to convert the code of this language into files like PDF, RSS, and RFT.
Disadvantages of XHTML:-
1- It is less popular than HTML, used by very few browsers.
2- In this it is mandatory to write declaration.
3- Its syntax is quite complex due to which the user has to face many problems in learning it.
4- This language is not suitable for new developers.
XHTML Example –
Its program is given below:-
<?xml version=”1.0″ encoding=”UTF-8″?>
<!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/TR/xhtml1″ xml:lang=”en” lang=”en”>
<head>
<title>Your Title Goes Here</title>
</head>
<body>
…your content goes here…
</body>
</html>
Difference between HTML and XHTML:-
HTML and XHTML
(1)-Its full name is Hypertext Markup Language. (1)- Its full name is Extensible Hypertext Markup Language.
(2)-It was developed by Tim Berners-Lee. (2)- It was developed by W3C (World Wide Web Consortium).
(3)-It was developed in 1991. (3)- It was developed in 2000.
(4)-In this, all the tags can be written in both lowercase and uppercase. (4)- In this, tags are written only in lowercase.
(5)-It is not mandatory to write Doctype in this. (5)- In this it is necessary to write Doctype.
(6)-In this it is not necessary to close the tags. (6)- In this it is necessary to close the tags.
(7)-Its file can be saved with .htm and .html extension. (7)- Its file can be saved with .xhtml, .xht, and .xml extensions.
Features of XHTML:-
1-Its code is very easy to maintain, edit and format,
2-Is more stable than HTML.
3-It helps in creating complex websites.
4-We can also use it with CSS.
What is the full form of XHTML?
Its full form is EXtensible HyperText Markup Language.
What is the difference between HTML and XHTML?
In HTML we can write tags in both lowercase or uppercase, but in XHTML we can write tags only in lowercase.