THE FILE FIELD GUIDE
.html

HTML

Web & Development

HTML is text describing a web document’s structure. Browser viewing differs from source editing. A page may also need CSS, images and JavaScript for its appearance and behavior.

What it is used for
Structure of web documents
What the file contains
Text
All sections, questions and sources

Content reviewed: · Editor:Kai

Opening steps

Choose your environment or purpose to see its steps.

Browser: view the page

Viewing and source editing are separate.

  1. Open a trusted HTML copy in a browser.
  2. Check missing images/CSS and retain accompanying folders in their relative positions.
  3. For features that fail locally, consult the source site or required server environment.
Editor: edit the source

Edit HTML as plain text.

  1. Open the project folder in an editor such as VS Code and select the HTML.
  2. Inspect matching tags, encoding and CSS/JS references.
  3. Save a copy, reload in a browser and inspect appearance and links.
Publishing: inspect deployment

Local success does not verify deployment.

  1. Map the public root and URL to the file location.
  2. Deploy HTML and required assets with the same structure and check case sensitivity.
  3. Inspect images, internal links and forms at the public URL.

Menu labels and support vary by app, OS and version. Preserve the original before making changes.

Troubleshooting by symptom

  • Missing imagery/styles: check relative paths and companion folders; HTML alone may be incomplete.
  • Garbled text: align file encoding with charset; identify the original before resaving.
  • Local failure: file URLs have restrictions; check the project’s required server workflow.
  • Only images fail: check relative paths, filenames, deployment and URL capitalization.
  • Garbled text: compare saved encoding, charset and server headers.
  • Fails under file://: inspect network/module restrictions and whether a development server is required.

HTML → PDF / print copy

  1. Confirm resources render, then use the browser’s print-to-PDF workflow.
  2. Inspect page breaks, backgrounds, links and wide tables in print preview.
  3. Inspect PDF page completeness, breaks, backgrounds and selectable text; retain HTML/assets separately.

PDF normally does not preserve forms or JavaScript behavior. Keep the HTML and assets.

HTML, CSS and JavaScript roles

HTML defines content/structure, CSS appearance and JavaScript behavior. Moving HTML alone can break references.

Check source readability, browser rendering and server functionality separately.

Source for these steps:Microsoft · HTML in Visual Studio Code

Comparing saved and hosted pages

Relative references depend on location. Retain asset folders and inspect their links.

For PDF distribution inspect print styling, pagination, backgrounds and links; dynamic controls are not preserved identically.

Source for these steps:Microsoft · HTML in Visual Studio Code

Related-format differences

Related-format differences
FormatMain roleSelection notes
HTMLPage structure / contentCheck assets and server requirements
CSSAppearance rulesReferenced from HTML
PDFFixed-page distributionSeparate from dynamic functionality

Handling and security

Inspect unknown HTML as text first; browser opening can execute scripts or contact external sites. Do not trust unexpected credential requests.

Questions and answers

Does HTML alone preserve a website?

Not if it references separate CSS, images or scripts.

Does renaming to TXT remove the code?

No; it only changes the filename.

Will web forms work in the PDF?

Web interactions normally do not carry over.

Can I rename HTML to PDF?

Use browser printing/PDF output; renaming does not create PDF structure.

Does saving a page preserve all web functionality?

Server processing, authentication and APIs may not be preserved. Check the original environment.

Format facts: name, steward and MIME type
Formal name
HyperText Markup Language
Steward / specification
WHATWG
MIME type
text/html

Primary and official sources

  • StandardHTML Living Standard

    Specification for HTML documents, elements and resources.

    WHATWG · Link checked:
  • Software documentationHTML in Visual Studio Code

    Reference for HTML editing, formatting and preview.

    Microsoft · Link checked: