What is a .HTML file?

HTML is the coding language that structures many webpages. The .HTML file format is where you write and lay out that code. You can create a .HTML file in a simple text editor like Notepad or TextEdit or using specialist web development software such as Adobe Dreamweaver.

Files are identified with the .html or .htm extension and comprise of lines of text sectioned off with ‘tags’, to indicate where each element should sit on the page. Common tags include:

  • <H1>. main page heading
  • <body>. main body of the page
  • <p>.a paragraph of text
  • <b>. bold text

HTML was largely based on SGML (Standard Generalised Mark-up Language), the industry standard for structuring written content into distinct elements such as headings and paragraphs. Early versions of HTML were only able to handle text, but later iterations worked with imagery, video and graphic elements.

What does .HTML stand for?

HTML stands for Hypertext Mark-up Language. The much simpler acronym HTML soon caught on as shorthand for the format among scientists and researchers in the early 1990s. By the noughties, it was commonly recognised as a way to build websites, even among non-tech people.

  • Hypertext was an innovation in the late 1980s that enabled users to jump between files on the same computer by tapping a button. That functionality is central to HTML web design.
  • HTML is the original coding language for websites, while mark-up details the ways information is laid out on the page, with symbols to box off and position elements on your webpages.

Manage your documents effectively

Get some help with heavy lifting on document creation and editing with Adobe’s collection of online tools.

Try Adobe's online tools

History of the .HTML file.

The HTML story begins in the early 1990s, when the Internet was mostly been utilised by a select group of scientists and academics located as far apart as Bristol and Geneva.

Sir Tim Berners-Lee, computer scientist and inventor of the World Wide Web, developed HTML in 1992 to help make sense of the earliest online content.

Refining HTML on early browsers.

After developing HTML, Berners-Lee encouraged fellow scientists to create their own HTML documents, along with software capable of reading them. Working with other pioneers, Berners-Lee tested and refined HTML using primitive, early web browsers. Soon after, a new company called Netscape launched its own successful web browser - and the world shifted on its axis.

The arrival of Internet Explorer and standardisation.

As the Internet emerged from research labs and into the public arena, Microsoft launched its own browser —Internet Explorer (IE). In the coming years, I.E. would become one of the most popular ways to access the Internet. The bigger the Internet became, the more people used HTML files to create websites. Soon, the W3 Consortium decided to standardise the format for consistency’s sake.

The rest, as they say, is history.

What are .HTML files used for?

Web developers and coders use HTML files to structure the content on a webpage. It’s what’s known as a ‘front end’ technology in web development, as it deals with elements that users see, read and use when interacting with a website.

Structuring the page.

When you look at a webpage, you’ll see it has a distinct layout, much like a magazine or newspaper. HTML files are what makes possible this. Essentially, HTML communicates with the web browser to tell it where to display the various elements on the page based on how everything is tagged.

Creating page elements.

To set the layout, web developers create HTML elements. This means using common symbols to mark-up content, with the actual text to go on the page placed between alphanumeric tags. For example, a heading for a page about HTML may look like this:

Guide to HTML

Discover more document types

Pros and cons of .HTML files.

Like any technology, there are pros and cons of working with HTML files.


  • Easy to learn. If you’re new to coding and web development, HTML is the easiest language to get up and running with, whether writing or editing.
  • Open standard. HTML is open standard, which means you can access and use it for free while expert stakeholders often update and improve it.
  • Wide browser support. Every web browser supports HTML, so when writing pages in it you know it’ll be compatible, regardless of how the searcher is accessing the web.
  • Smooth integration. HTML plays nicely with other coding languages. For example, CSS is another front-end language. An HTML file can also work with CSS code.


  • Lack of ‘dynamism’. Today, webpages are dynamic. They scroll endlessly and respond and reorient to different screen sizes. This is beyond basic HTML, so you’ll need another language like CSS for that.
  • Browser differences. An HTML page can present differently on screen depending which browser you view it through. For example, Google Chrome layout may differ from Firefox for HTML pages.
  • Time consuming. Creating HTML pages can be laborious, as you’ll generally need to write large amounts of code even for a basic webpage. Today, there are easier ways to build webpages.

How to open a .HTML file.

To open a .HTML file, you can either launch it within the text editor you created it in, if you want to edit the code or you can view it in a web browser.

Open an HTML file in TextEdit for Mac.

When using a Mac, you can open the HTML file in the TextEdit app.

  1. Simply launch the TextEdit app on your Mac
  2. Choose File > Open
  3. Select the file you want to view.

This will show you the HTML as it will display online. If you want to edit the code, you’ll need to choose the option to ‘Display HTML files as HTML code instead of formatted text’.

View a HTML file in a web browser.

To view a .HTML file through your web browser, simply find the file on your computer - then right-click (or double click with Mac) and choose Open With before selecting Google Chrome, Microsoft Edge or Firefox.

How to create and edit a .HTML file.

You can create a .HTML file using either an in-browser text editor or a simple desktop text editor. These include Microsoft Notepad on a PC or TextEdit on a Mac.

Creating an HTML file on a PC

To create an HTML file on your PC, simply:

  1. Open Notepad
  2. Write your HTML on the blank page using text, tags and spacing
  3. Save the file (File > Save As) with .html after the name
  4. Set the encoding to UTF-8.

Creating a HTML file on a Mac

To create an HTML file on Mac, simply:

  1. Open TextEdit on your Mac
  2. Go to File > New. Then Format > Make Plain Text
  3. Write your HTML using text, tags and spacing
  4. Save the document (File > Save) with the .html extension
  5. Choose Use .html when asked.

Once saved, these .HTML files can then be edited too.

Secondary .HTML Filetypes


.HTML and .HTM are interchangeable. Both are file extensions for HTML; the only difference is that Windows required a three-character extension, hence the missing L.


XHTML is a version of HTML that demands more accurate mark up with its coding, plus sharper error handling, to ensure it can work with XML data files.

How to convert .HTML file to PDF

You can convert HTML pages to PDF relatively easily with the correct software. For example, with Adobe Acrobat PDF tools you can save an HTML file as a PDF from within your web browser. This can make it easier for you to share your HTML files with colleagues with the original formatting and functionality retained. You’ll generally need Adobe Acrobat Pro for this. From there, you can easily upload your new PDF to Adobe Acrobat online to combine files, organise pages, split your PDF and more.

Learn more about similar file types to .HTML


DAT files tell you more about the programme that was used to create them.


JS is short for JavaScript - one of the most widely-used languages for coding website back ends.


Microsoft developed the XPS file to capture page layout information for printing.


TXT is the extension you’d use when creating a plain text file in Notepad.

Looking to edit, convert or share your DOCX

Adobe Acrobat Online has all the tools you need to do more with your documents.

Try Adobe's online tools


How secure is a .HTML file?

When creating yourself on a well-maintained and protected device, you should be fine. However, recent research has raised questions around the security of the HTML file, especially when sent as an attachment. IT security company Barracuda Networks foundStudies have shown that a fifth of all HTML email attachments it scanned were malicious. As such, it is important to keep your anti-virus software up to date and be careful which attachments you are opening.

Is .HTML secure?

An HTML file is a text-based file that is used to structure the content of a webpage. So, you may write your HTML code in Notepad or TextEdit and then copy it into a professional HTML editor such as Adobe Dreamweaver. You can also write code directly into Dreamweaver or another website building tool.

How can I convert .HTML to PDF?

You can convert HTML pages to PDF relatively easily with the correct software. For example, with Adobe Acrobat PDF tools you can save an HTML file as a PDF from within your web browser. This can make it easier for you to share your HTML files with colleagues with the original formatting and functionality retained. You’ll generally need Adobe Acrobat Pro for this.

Where was HTML first invented?

Computer scientist Sir Tim Berners-Lee invented HTML at the CERN scientific research centre in Geneva, Switzerland. Berners-Lee also wrote the first version of HTML in 1993. It came after his invention of the World Wide Web in 1989.

Should I start with CSS or HTML?

HTML and CSS technologies are used to build the front-end of websites. Often, they are wielded together, with HTML used at the start for the structure and content of the page and CSS then helping to create the visual layout - effects, colour etc. As such, working with both can be an ideal solution.