Files and formats

HTML, CSS and JS files: read page source and understand browser execution

Distinguish page structure, styling and behaviour, and inspect web files before previewing them.

Updated: 07/11/2026

Teaching illustration: HTML, CSS and JS files: read page source and understand browser execution
Mira4Tech teaching illustration.

Follow the steps and understand the result

Step through at your own pace, or play the walkthrough to follow each stage.

What the file is

sample.html

Open or inspect it step by step

identify source → inspect

Convert or export

index.html → structure

Verify the result

repeat the task → compare

What the file is

HTML describes structure, CSS describes presentation and JavaScript adds executable behaviour. Styles and scripts may be inline or separate files. MJS is used for JavaScript modules in supporting environments; the extension does not make a script a standalone application.

Open or inspect it step by step

Read source in a text editor. For a known project you control, keep its folder structure and preview the test copy using its documented setup. If relative resources or modules fail under a local file URL, use a local preview server for the project folder and inspect Console and resource errors.

Worked example

index.html → structure
styles.css → appearance
app.js → behaviour

Convert or export

For text sharing, export the content as text. For a static page view, print a trusted page to PDF; the result will not keep JavaScript interactions. Sending an HTML file alone may omit images and external CSS or JS.

Verify the result

Change one visible line in a training copy, reload and confirm styling and intended interaction. Try a narrow viewport and distinguish a missing asset from a loaded script that produces an error.

What to watch for

Unknown HTML can run scripts, open links or load external resources. Inspect it as text first. Do not enter sensitive data into an untrusted preview.

Official references