Skip to content

Local search · English

    Edit HTML, head entries and JavaScript

    HTML is the source of truth in Strukt. The visual editor, element HTML and document head are projections of the same document model. Choose the surface that owns the change so you do not accidentally replace unrelated metadata or page structure.

    • Save the current draft and keep a recovery download before a large source replacement. Only use scripts whose behavior you understand.
    1. Select an element to edit its subtree. Use document-level controls for language, title, HTML/body attributes and ordered head entries. A <meta name="description"> belongs in the head, not inside a paragraph.

    2. Apply the edited source and inspect the resulting selection and tree. Keep text spaces and comments when they are meaningful. Avoid duplicate titles or descriptions when importing metadata from another page.

    3. Use page scripts for page-specific behavior or a managed JavaScript site file for shared behavior. Choose classic/module and head/body-end placement deliberately; a module can depend on origin and CORS rules.

    4. Set Asset base URL only when resolving relative assets during Design and Preview requires it. Published HTML keeps the authored paths, so verify those paths on the public origin after publication.

    • The head contains the intended metadata, source edits persist, and behavior works in Preview JS and on the published page.

    Design strips event-handler attributes and does not execute authored scripts. Diagnose runtime behavior in Preview JS or the public page; do not try to weaken the Design sandbox. If the metadata editor reports ambiguity, locate and resolve duplicate head entries first.

    Applies to Strukt c02552848c92 · 2026-10-31