HTML Boilerplate Generator
Build an HTML starter document with title, language, metadata, asset paths, and review notes before copying full-page or head markup.- {{ warning }}
{{ htmlOutput }}
| Feature | Status | Value | Reason | Copy |
|---|---|---|---|---|
| {{ row.feature }} | {{ row.status }} | {{ row.value }} | {{ row.reason }} |
| Asset | Emitted as | Path or value | Placement | Copy |
|---|---|---|---|---|
| {{ row.asset }} | {{ row.emittedAs }} | {{ row.value }} | {{ row.placement }} |
A new HTML page starts with a document frame before any visible content matters. The browser reads that frame to choose standards mode, decode text, size the layout on phones, name the tab, and discover linked resources. When those early lines are wrong, the page may still appear to load, but the mistakes can spread into accessibility, search snippets, sharing previews, and asset loading.
Good boilerplate is intentionally modest. It includes the essentials that almost every page needs, then keeps publishing choices explicit. A copied starter that carries a stale canonical URL, a broad robots rule, or social-preview metadata from another project can send the wrong signal as soon as it is published.
- Document mode
- The doctype keeps modern browsers out of legacy layout behavior.
- Language
- The root language tag helps assistive technology, translation tools, search systems, and CSS language matching.
- Head metadata
- The head carries the title, character set, viewport, description, canonical URL, crawler policy, icon, and other page-level facts.
- Linked assets
- Stylesheets, scripts, favicons, and optional fallback text must point to paths that make sense from the final page location.
Different metadata answers different questions. A title helps users recognize a tab and browser history entry. A description gives search and sharing systems a short summary to consider. A canonical link tells crawlers which URL should represent similar copies of the same content. A robots directive can change indexing and link-following behavior, so it should be added only when that policy is intentional.
The safest starter is specific enough to avoid blank-page mistakes and restrained enough to avoid accidental publishing policy. It gives a known-good shell, then leaves final content, validation, accessibility review, and search decisions to the actual page build.
How to Use This Tool:
Start with the page identity, then add optional metadata only when the page has a real publishing context.
- Enter
Document title. This becomes the generated<title>and the fallback forMain headingwhen the heading field is blank. - Write
Meta descriptionand setLanguage code. The notes area flags a blank description, a description over 160 characters, or a language value that does not look like a normal BCP 47-style tag. - Use
Main headingandIntro paragraphwhen the starter should contain visible body content beyond an empty shell. - Add
Stylesheet path,Script path, andFavicon pathonly when those files will exist from the page's final location. PickModule scriptfor import-based JavaScript orClassic script with deferfor a traditional external script. - Open
Advancedfor canonical URL, theme color, robots policy, Open Graph tags, color-scheme metadata, inline starter reset, and no-script message. Leave these off when you are making a reusable local starter. - Read
Boilerplate notes. Fix non-absolute canonical URLs, Open Graph output without a canonical URL, non-hex theme colors, or whitespace in asset paths when those notes reveal an unintended value. - Review
HTML Starter,Head Checklist, andAsset Paths. Copy the full HTML, copy the head section, or download the starter after the checklist matches the page you intend to publish.
Interpreting Results:
The summary reports generated line count, head element count, selected script behavior, stylesheet status, language, UTF-8, and warning count. Treat those numbers as a review snapshot, not a promise that the finished page is ready to ship.
| Result area | What it confirms | What to verify |
|---|---|---|
| HTML Starter | The complete generated document with doctype, root language, head, body, optional intro, optional no-script notice, and optional script tag. | Check the copied markup in the project location where relative paths and final content will matter. |
| Head Checklist | Required and optional head features marked as Included, Omitted, Review, or Optional. | Resolve Review rows for title, language, description, or optional metadata before publishing. |
| Asset Paths | Which stylesheet, script, favicon, canonical URL, theme color, robots, Open Graph, and no-script items were emitted. | Confirm each path, URL, and policy is intentional rather than inherited from a previous starter. |
| JSON | A structured record of the generated HTML, head markup, checklist rows, asset rows, counts, and warnings. | Use it for review or handoff; the HTML document is still the file you publish. |
A clean checklist does not test content quality, live asset availability, search ranking, Open Graph preview rendering, or accessibility beyond the starter structure. Use it to catch boilerplate mistakes, then validate the finished page in its real project.
Technical Details:
The generated document uses the short HTML doctype so browsers choose standards mode. The root lang value is written to the html element, with underscores converted to hyphens and a blank value falling back to en. The head always includes UTF-8 character encoding, a responsive viewport declaration, and the document title.
Optional metadata is emitted only when the corresponding value or switch is present. A blank description omits the description meta tag. A canonical URL creates a canonical link, and Open Graph metadata can reuse the title and description while adding og:url only when a canonical URL exists. Robots metadata is controlled by a separate switch so a starter does not publish crawler instructions by accident.
Scripts are placed near the end of the body. Module mode emits type="module", while classic mode emits defer. A no-script notice appears only when the no-script option is enabled and a script path exists. Text and attribute values are escaped before insertion into markup, which protects the starter from broken tags but does not prove that a URL, path, language tag, color, or crawler policy is the right one for the project.
Count Core:
The headline count is based on the generated lines after the document is assembled. The head element count includes generated head lines that begin with meta, title, link, or style. Optional feature count covers only advanced features that are actually present.
Transformation Core:
| Choice | Generated markup | Boundary to check |
|---|---|---|
| Title and heading | <title> in the head and <h1> in the body, with the title reused when the heading is blank. |
A blank title falls back to Untitled Page and receives a review note. |
| Description | <meta name="description"> and optional Open Graph description when text is present. |
Blank text omits the tag; text over 160 characters receives a review note. |
| Language | lang on the root html element. |
The check is pattern-based and does not validate every registered language subtag. |
| Canonical and Open Graph | <link rel="canonical">, og:type, og:title, optional og:description, and optional og:url. |
Canonical URLs should be absolute for published pages; og:url is omitted without a canonical URL. |
| Robots policy | <meta name="robots"> with the selected directive. |
The directive is not emitted unless Include robots meta is on. |
| Assets and script | Stylesheet and favicon links in the head, optional no-script text in the body, and the script tag at the end of the body. | Whitespace in asset paths is reported because escaped paths can still be wrong paths. |
Warning Rules:
| Warning condition | Why it matters | Usual correction |
|---|---|---|
| Blank title | Browser tabs, history entries, and default share labels become generic. | Enter a page-specific document title. |
| Blank or long description | A missing description removes the tag; an overlong one may be poor snippet material. | Write a concise summary of the actual page. |
| Unusual language tag | Assistive and translation tools rely on a well-formed language value. | Use a simple tag such as en, en-US, or ms-MY. |
| Relative or non-HTTP canonical URL | Published canonical signals are safer when they name the full preferred URL. | Use an absolute https:// URL or leave the field blank for a local starter. |
| Open Graph without canonical URL | The share-preview URL cannot be emitted without a URL source. | Add the canonical URL or keep Open Graph off. |
| Non-hex theme color | The value is emitted as typed, but hex colors are the safer cross-browser starter choice. | Use a value such as #0d6efd or omit the tag. |
The generator does not read project files, crawl a site, or confirm that linked files exist. It assembles a starter from the entered values and highlights likely boilerplate mistakes so you can inspect the result before copying it into a project.
Worked Examples:
Internal launch dashboard
A team page titled Launch Readiness Dashboard can keep Language code as en, use a local stylesheet path, and leave canonical, robots, Open Graph, and theme color off. HTML Starter produces a reusable page shell, while Head Checklist should show the required document frame and omit optional publishing metadata.
Published product note
A public article can use a specific title, a short Meta description, an absolute Canonical URL, a favicon path, and Open Graph tags. In Asset Paths, confirm the canonical row shows the full URL and the Open Graph row includes a URL rather than URL omitted.
Classic script starter
A small page that loads /assets/js/app.js without imports can choose Classic script with defer. The generated script appears at the end of the body with defer, and Head Checklist still records the script tag as included.
Troubleshooting copied metadata
If Boilerplate notes reports a relative canonical URL, Open Graph output without a URL, and whitespace in a stylesheet path, fix those fields before copying. The resulting Asset Paths table should show a full canonical URL, intentional Open Graph output, and clean file paths.
FAQ:
Should every starter include all optional metadata?
No. Optional tags should match a real publishing decision. Leave canonical, robots, Open Graph, theme color, and color-scheme metadata off when you are building a reusable local starter.
Why did the description tag disappear?
A blank Meta description omits <meta name="description"> and triggers a note. Add actual summary text when the page should carry a description.
Why does the canonical URL need to be absolute?
The warning follows search-engine guidance for published pages. Use a full https:// URL for a real page, or leave the canonical field blank for a local starter.
Should a module script also use defer?
No. The generated module script uses type="module" without defer. Choose Classic script with defer only when you want a non-module external script.
Does the generated HTML validate the whole page?
It validates only the starter choices it can see. You still need to test final content, linked files, accessibility, responsive layout, and any project-specific search or sharing requirements.
Glossary:
- Doctype
- The preamble that tells browsers to parse the page using modern standards behavior.
- Language tag
- A BCP 47-style value such as
enoren-USused to identify the page language. - Viewport
- The browser layout area controlled by responsive viewport metadata.
- Canonical URL
- The preferred published URL for a page when similar or duplicate versions may exist.
- Robots directive
- A crawler instruction such as
noindexornofollowplaced in page metadata. - Open Graph
- Metadata used by many social and messaging previews to choose a title, description, type, and URL.
- No-script notice
- Fallback body text shown when JavaScript is unavailable and the generated page includes a script path.
References:
- HTML Standard: Syntax, WHATWG.
- Language tags in HTML and XML, W3C International.
- meta name="viewport" HTML attribute value, MDN Web Docs.
- How to Specify a Canonical with rel="canonical" and Other Methods, Google Search Central.
- Robots Meta Tags Specifications, Google Search Central.
- How to use canonical URLs for your website, simplified.guide.
- How to add external JavaScript to HTML, simplified.guide.
- meta name="theme-color" HTML attribute value, MDN Web Docs.