.HTML File Extension
File TypeHypertext Markup Language File
What is an HTML file?
An HTML file contains Hypertext Markup Language (HTML), which is used to format the structure of a webpage. It is stored in a standard text format and contains tags that define the page layout and content of the webpage, including the text, tables, images, and hyperlinks displayed on the webpage. HTML files are widely used online and displayed in web browsers.
HTML was introduced in 1991 by Tim Berners-Lee and other CERN engineers as a way for web browsers to interpret and display webpages. Since its release, it has become a standard in web development and has gone through multiple revisions, which include HTML 2 (1995), HTML 3 (January 1997), HTML 4 (December 1997), and HTML 5 (2014).
The markup language features HTML elements, which are used for building the structure of webpages. Typically, each element includes an opening tag enclosed in angle brackets (<tag>) and a closing tag enclosed in angle brackets but with a forward slash preceding the tag (</tag>).
Some examples of basic elements include:
- <head> - Head tag used to contain metadata about a webpage
- <body> - Body tag that defines the body of a webpage
- <h1> - Text header tag used to create a text title in a webpage
- <p> - Paragraph tag used to define a paragraph in a webpage
- <img> - Image tag used to embed an image in a webpage
- <ul> - Unordered list to create a bulleted list in a webpage
- <div> - Divider tag used to create a section in a webpage
Web developers often create and edit HTML files, then upload them to web servers that web browsers parse when a user visits webpages. If you are an average Internet user you most likely will not see the HTML source code since it is parsed by the web browser in the background.
However, you can still view the HTML of a webpage with a web browser by following these steps:
- Google Chrome (Windows) - Select
- Google Chrome (Mac) - Select
- Mozilla Firefox - Select
- Microsoft Edge - Select
- Apple Safari - Select
index.html - The main, or index, HTML file that's loaded when a client web browser requests a web server directory. For example, when http://www.sampledomain.com/ is requested, the web server loads http://www.sampledomain.com/index.html by default, unless it is configured to use a different file.
default.html - The index file often used by Windows web servers such as Microsoft IIS.
How do I open an HTML file?
You can open and edit HTML files with various source code editors and web development applications. Microsoft Visual Studio Code (multiplatform) is a helpful source code editor and Adobe Dreamweaver (multiplatform) is a popular web development application.
Since HTML language is saved in plain text, you can also open and edit HTML files with a basic text editor, such as Microsoft Notepad (Windows) or Apple TextEdit (Mac). However, these text editors do not come with features included with source code editors and web development apps that make it easier for developers to code.
You can preview an HTML webpage by opening it with a web browser, such as Google Chrome (multiplatform), Microsoft Edge (multiplatform), Mozilla Firefox (multiplatform), or Apple Safari (Mac and iOS).