HTML Extension

HTML is the HyperText Markup Language used on the internet mainly for providing the structure of websites. Image files have extensions, which could be .png, .jpg, etc.; in such a way, HTML files also have extensions so that we will discuss the HTML extension in this article.

There are four types of HTML file extensions, which are as follows:

  1. .html
  2. .shtml
  3. .dhtml
  4. .xhtml

We will discuss each type one by one.

1. .html

It is the basic version of HyperText Markup Language, i.e., HTML. The extension of the HTML file is .html. When HTML was introduced in the late 90s, then, the .htm file extension was used to save the HTML file, but now .html is used.

The HTML file contains HTML tags such as <h1>, <p>, <table>, <img>, etc., which are used to show the content on the web page. When you write an HTML file, then, you need to save that file using the .html extension; otherwise, the file will not be considered an HTML file. For example: file_name.html. Most browsers, such as Google Chrome, Microsoft Edge, Firefox, Safari, Opera, Internet Explorer, and Samsung Internet, support it.

2. .shtml

SHTML is the short form of Server-parsed Hypertext Markup Language. It uses SSI, i.e., Server Side Includes, which enables the HTML page to run the server-side scripts and load the files faster by optimizing HTML. The file extension of SSI HyperText Markup Language is .shtml. For example: file_name.shtml.

The SHTML files are placed inside the HTML pages and permit users to create dynamic content, so basically, the SHTML files are used when dynamic content is required. The SHTML files are written in a hypertext markup language, and then the web server processes SHTML files by interpreting the SSI directives. These SSI directives help specify what content should be kept in the HTML output and where the content should be kept, and then the final HTML output is delivered to the user. It is compatible as most web servers support it.

3. .dhtml

DHTML is short for Dynamic Hypertext Markup Language, which is a web standard used to help and support dynamic characteristics like dynamic menus, animation, etc. It is not an independent markup language, but it is used as a methodical language such as HTML, CSS, and JavaScript. The file extension of the dynamic HyperText Markup Language is .dhtml. For example: file_name.dhtml.

DHTML works with a combination of technologies such as HyperText Markup Language (HTML), JavaScript (JS), Cascading Style Sheets (CSS), and Document Object Model (DOM). Any element on a web page, such as text, images, tables, etc., can be manipulated with the help of DHTML. The DHTML creates animated web pages that are movable even without reloading anything from the server. It provides a flexible layout, motion without plug-ins, and faster interactivity. It is supported by browsers such as IE 5.5, Opera 5, and Netscape 6.

4. .xhtml

XHTML is the abbreviation for the Extensible Hypertext Markup Language, which uses some rules and specifications of XML that come from the World Wide Web Consortium (W3C). The XHTML is the XML-based version of Hypertext Markup Language. The file extension of Extensible HyperText Markup Language (XHTML) is .xhtml. For example: file_name.xhtml.

We can use our tags, which means tags are not limited and predefined but can be extended. This feature is supported by all browsers, such as Google Chrome, Safari, Microsoft Edge, Opera, and Firefox, and it makes HTML more extensible.

The following table shows the HTML file with their file extension and feature:

HTML Extension

Conclusion

We have studied the HTML extension in this article. The following are the important points that have been concluded:

  • There are four kinds of HTML extensions: .html, .shtml, .dhtml and .xhtml.
  • .html: This extension is used for HyperText Markup Language (HTML) files.
  • .shtml: This extension is used for Server-parsed HyperText Markup Language (SHTML) files.
  • .dhtml: This extension is used for Dynamic HyperText Markup Language (DHTML) files.
  • .xhtml: This extension is used for Extension HyperText Markup Language (XHTML) files.

Next TopicHTML Grid




Latest Courses