THE GITHTML FIELD GUIDE
Use inline CSS for a dependable portable reading copy
For a portable reading copy, place essential CSS in a style element inside the HTML document and use dependable system font fallbacks. This removes a separate stylesheet dependency, but it does not automatically embed images, fonts, scripts, or linked pages. Inspect the CSS itself for additional resource references before calling the document self-contained.
Decide which styling is essential
Start with readable text, clear headings, visible warnings, usable tables, and code blocks that do not force the whole page wider than the screen. Decorative effects can wait. The objective is a document that remains understandable when the rest of a website is unavailable.
Use the original brand styling only where it helps reading. A lightweight technical packet rarely needs the complete navigation framework, animation system, or font collection of the public website.
Keep the stylesheet in the document
An HTML style element can hold the CSS needed for the page. Put it in the document head as part of your authoring or export workflow. Keep rules focused on document content so they are easy to inspect and maintain.
Prefer a system font stack instead of importing a remote font. Also review background-image declarations and other URL references. Moving a stylesheet into HTML does not eliminate the resources that the stylesheet itself requests.
- Keep essential styles in the document head.
- Replace unnecessary remote fonts with system fallbacks.
- Inspect CSS URL references and test the page disconnected.
Protect content from layout choices
Ensure warnings use text labels as well as color. Give images and tables sensible width behavior, and allow long code samples to scroll within their own block. Avoid fixed heights that can clip expanded text or translated material.
Check the document at narrow and wide widths, with a larger text setting if available. A page that looks polished on the author’s monitor may hide essential details on a phone. Reading reliability is more important than matching every original pixel.
Verify the remaining boundaries
Open the copy without network connectivity and with JavaScript disabled. Confirm that the full argument, examples, and navigation remain usable. Inline CSS should support content already in the HTML, not disguise an empty page waiting for a script.
Record which assets remain external. In gitHtml, do not assume those dependencies were mirrored merely because the HTML page appears in the library. When an essential figure cannot be packaged safely, include an adequate text explanation and clearly label the external reference.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.