• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WebMEM™

The Protocol for Structuring, Delivering, and Conditioning Trust-Scored AI Memory on the Open Web

  • Primer
  • Memory-First
  • Protocols
    • SDT Specification
    • WebMEM SemanticMap
    • WebMEM MapPointer
    • Digest Endpoint Specification
    • ProvenanceMeta Specification
    • AI Retrieval Feedback Loop Specification
    • Semantic Feedback Interface (SFI) Specification
    • Glossary Term Protocol (GTP) Specification
    • Examples
  • RFC
  • Glossary
  • About
    • WebMEM License
    • Mission
    • Charter

SDT YAML-in-HTML: HTML Container Attributes

Part of the WebMEM Protocol
Location: /specification/sdt/yaml-in-html/attributes/
Last Updated: 2025-07-28


HTML Container Attribute Reference

The <template> element serves as the outer container for every Semantic Data Template (SDT) fragment. To support agentic discovery, DOM parsing, and metadata extraction, a specific set of data-* attributes are used to encode fragment-level identity, class, and scope.

Required Attributes

Attribute Description
data-visibility-fragment Declares the template as an SDT fragment. Required on all fragments.
data-type="text/yaml" Signals the format of the template body (YAML-in-HTML). Required.
data-sdt-class The SDT fragment class (e.g., DataFragment, FAQFragment). Must match the data-sdt-class: in the YAML body.
data-entity Defines the real-world subject the fragment describes (e.g., plan:H5521-290-0). Required for entity-scoped classes like DataFragment, DefinedTermFragment, etc.
data-digest Declares the digest group this fragment belongs to. Used for retrieval, export, and clustering.
data-fragment-scope Declares the publishing domain or retrieval layer (e.g., semantic-digest, gtp). Enables AI agents to cluster fragments by trust layer.

Example Usage of data-fragment-scope

<template data-fragment-scope="sdt-core-protocols">

Recommended Attributes

Attribute Description
data-glossary-scope Namespace governing glossary: and related_terms: inside YAML. Strongly recommended.
data-fragment-id Canonical ID for internal references, citation anchoring, and export metadata. Optional if id="..." is resolvable.

Note: All data-* values must match their equivalents in the YAML fragment header.


Reserved ID Conventions

The id attribute on <template> and <div> plays a crucial role in linking, citation, and trust propagation.

Reserved Patterns

Pattern Applies To Purpose
id="provenance-meta" <div> or YAML block Declares the ProvenanceMeta trust anchor. Must be unique per page.
id="fragment-*" <template> Standard prefix for SDT containers. Required for machine-resolution and export.

Examples

<!-- SDT Fragment -->
<template id="fragment-h5521-290-0-primary-care" ... >

<!-- Provenance Block -->
<div id="provenance-meta" ... >

Best Practices

  • Prefix all SDT containers with fragment-
  • Never reuse fragment IDs across entities or digests
  • Only use provenance-meta once unless composing for multiple children

Learn More

  • Fragment Structure
  • Validation Rules
  • ProvenanceMeta Block

Primary Sidebar

YAML-in-HTML SDT

  1. Semantic Data Templates (SDT) Specification
  2. YAML-in-HTML Embedding
  3. Anatomy of a Semantic DataFragment
  4. SDT Fragment Header Mapping
  5. Field Inheritance Across Fragments (inherits_from)
  6. Cross-Fragment Indexing (related_fragments)
  7. ProvenanceMeta Best Practices
  8. SDT YAML-in-HTML: HTML Container Attributes
  9. Semantic Data Atoms: Fields Block Specification
  10. Fragment Relationships and Referencing
  11. Semantic Data Template (SDT) Fragment Classes Overview
    1. DataFragment
    2. DerivedStatsFragment
    3. IndexFragment
    4. DefinedTermFragment
    5. FAQFragment
    6. MetaFragment
    7. ExplainerFragment
    8. DirectoryFragment
    9. EligibilityFragment
    10. ProcedureFragment
    11. GlossaryFragment
    12. PersonaFragment
    13. PolicyFragment
    14. RecommendationFragment

Copyright © 2026 · David Bynon · Log in