Rayo PDF GORayo PDF GO
HTML
File format

What is the HTML File format?

What is HTML, the language of web pages? Learn how it works, its history, and how to save a web page as a PDF without messing up the layout.

4 min read6 sectionsUpdated 2026-10-16

In 30 seconds

  • HTML is the markup language used to structure the content of web pages.
  • Tim Berners-Lee invented it around 1991; HTML5 became a W3C Recommendation in 2014.
  • An HTML file carries only the structure; CSS defines the look and JavaScript the behavior.
  • Saving a page as a PDF freezes it, but page breaks and responsive design can cause layout glitches.

1What is HTML?

HTML stands for HyperText Markup Language. It is not a programming language, but a set of tags that indicate what each piece of content is: this is a heading, this a paragraph, this a link, this an image, this a table. The browser reads those tags and builds the page you see from them.

It is the foundation of the web. Every site, from a personal blog to an online store, starts from HTML documents. An .html file is simply plain text that you can open with any editor and that the browser interprets; that is why it is so easy to create pages and check how they are made.

2History and standard: from 1991 to HTML5

Tim Berners-Lee devised HTML at CERN, around 1991, as part of the project that would become the World Wide Web. The first formal specification, HTML 2.0, was published in 1995 as RFC 1866. HTML 4.01 arrived in 1999 and dominated for years.

HTML5 became a W3C Recommendation in October 2014 and added elements for video and audio, better forms, graphics, and local storage. Since then the language has been developed as a living standard, the WHATWG HTML Living Standard, with continuous updates instead of numbered versions.

3How does an HTML page work on the inside?

An HTML document is organized as a tree structure. Inside the main tag there is a head, with data such as the title and references to stylesheets, and a body, with the visible content. Each element can contain others: a list contains list items, an article contains headings and paragraphs.

HTML only defines structure and meaning. The visual look is dictated by CSS, which determines colors, fonts, margins, and responsive design, and interactivity is provided by JavaScript. This separation into three layers lets the same page look different on a phone and on a large screen, and lets screen readers understand the structure for people with visual disabilities.

  • HTML: structure and meaning of the content.
  • CSS: presentation, colors, and responsive design.
  • JavaScript: interactivity and dynamic content.
  • Semantic tags (heading, article, navigation): help SEO and accessibility.

4HTML vs. PDF, Markdown, and EPUB

HTML is fluid by nature: it adapts to the screen, the font size, and the device. PDF is the opposite, a fixed layout in pages, ideal for printing or archiving. That is why a web page does not naturally correspond to a paginated document, and converting one to the other raises decisions: where to cut a page, what to do with menus, ads, or wide tables.

Markdown is a more comfortable way to write content that is later converted to HTML. And EPUB is, in essence, a set of HTML and CSS pages packaged as a book. Understanding that they all share the same root explains why it is so easy to move text between them and why PDF is the exception: it is the only one that fixes the appearance.

5How to save a web page as a PDF without messing up the layout

Saving a page as a PDF is useful for keeping an invoice, an article, a booking confirmation, or a receipt that could change or disappear. The Web to PDF tool in Rayo PDF GO is designed for that, and the result is generated on your device. Even so, it helps to know what happens under the hood so you can interpret any differences.

A web page is responsive, and when it is paginated the engine decides where to cut. You may end up with split images, tables that run past the margin, side menus that take up space, or content that only loads when you scroll. If the site offers a print view or a reader mode, use it first: it usually removes navigation elements and improves the result.

6Practical tips and common problems with HTML

Misdisplayed accented characters in an HTML file are usually caused by a missing encoding declaration; the meta charset UTF-8 tag in the head fixes it. Broken links and images that do not appear usually mean the HTML file saved on your computer depends on resources that were not downloaded along with it.

If you save a page as a PDF, links are usually preserved as active links, but check that they point to the right addresses. If the PDF turns out heavy because of the images, you can shrink it with Compress PDF, and if you only need the text, Extract text separates it from the layout. Avoid saving pages with sensitive data, such as banking sessions, in shared locations.

Finally, keep privacy in mind when saving pages: a page that shows your name, your address, or account details will contain that information in the resulting PDF. Review the document before sharing it and, if needed, hide data with permanent redaction instead of covering it with a box that could be removed.

Related tools

Frequently asked questions

What does HTML stand for?

It stands for HyperText Markup Language. It is used to define the structure of web page content with tags, and the browser interprets them to display the page.

Is HTML a programming language?

No. It is a markup language: it describes what each element of the content is, but it has no logic or calculations. JavaScript provides the logic and CSS provides the visual design.

How do I open an HTML file?

With any web browser, by double-clicking the file. To view or edit its source code, open it with a text or code editor.

How do I convert a web page to PDF?

You can use your browser's print-to-PDF option or a Web to PDF tool. Pages with responsive design may need margin adjustments or a print view.

Why do accented characters look wrong in my HTML file?

Because the browser does not know which encoding the file uses. Save the file as UTF-8 and add the UTF-8 charset declaration in the head so accented letters display correctly.

What is the difference between .htm and .html?

None in practice. .htm is a leftover from older systems that limited extensions to three characters. Both open the same way and have the same content.