Skip to main content

Definition Content Uses Bolded Term Followed by Colon Then Explanation

Issue No: 179

Category: Content & Readability

Issue type: Suggestion

Priority: STANDARD

Description

This audit verifies whether definition-style content on a page conforms to the specific structure (a bolded term, followed by a colon, followed by the explanation text) that is optimized for voice assistant parsing and featured snippet extraction.

How do we capture it

The XeoPix crawler captures this metric through structured analysis of the raw HTML retrieved via an HTTP GET request. Because the crawler does not execute JavaScript or render a DOM tree, any definition elements generated dynamically via client-side scripting are out of scope.

The collection and validation sequence is broken down into five distinct phases:

  1. The Network Handshake & Validation

    • Execute HTTP GET Requests: Initiate an HTTP GET request to fetch the raw source code of the target URL.
    • Manage Redirects: Automatically follow HTTP redirects up to a maximum policy threshold of 5 hops.
    • Filter Responses: Inspect HTTP headers immediately. Abort the audit instantly if the response Content-Type is not text/html or if the response status code is not 200 OK.
  2. Static Tree Parsing & Traversal

    • Build a Static Node Tree: Load the raw HTML response body string into a server-side parser (such as BeautifulSoup, Cheerio, or Nokogiri) to map out a static tag hierarchy.
    • Target Container Elements: Scan the parsed tree to isolate specific block-level containers where definition structures reside: <p>, <li>, <dd>, and <div>.
    • Filter by Child Elements: Evaluate these containers to check if the very first inline child node is an active bold element (<strong> or <b>).
  3. Text Extraction & String Manipulation

    • Extract Term & Potential Explanation: Extract the raw text within the bold tag as [Term]. Isolate the immediately following sibling text node (the candidate text block directly outside the closing bold tag).
    • Clean & Normalize Text: Trim leading and trailing whitespace from both components. Normalize non-breaking spaces (&nbsp; or \u00A0) and multiple consecutive whitespaces within the node content to single standard spaces (\u0020).
  4. Strict Pattern Matching (Regex & Length Checks)

    • Verify Definition Signatures: Apply the regular expression ^\s*:\s+(.+) to the extracted trailing text node. This ensures the text starts with a colon (:) followed immediately by at least one horizontal whitespace character.
    • Note on Regex Flexibility: While the regular expression tolerates optional leading spaces before the colon (e.g., <strong>Term</strong> : Explanation) to prevent unnecessary validation failures on minor spacing preferences, the optimal styling rule remains immediate placement after the closing tag.
    • Enforce Length Constraints: Reject the pattern match if the parsed [Term] length is $\le 1$ character, or if the parsed [Explanation] length is $< 15$ characters, protecting against false positives from short list items or key-value structures.
    • Filter In-Tag Colons: Explicitly flag and log instances like <strong>Term:</strong> as a mismatch. In this case, the parser will determine that the immediate trailing text node lacks the starting colon outside the tag boundaries. Categorize this structural violation explicitly as an enclosed_colon_violation.
    • Identify Spacing Violations: If a colon exists immediately after the closing tag but is not followed by a space (e.g. <strong>Term</strong>:Explanation), flag this as a whitespace_violation.
    • Deterministic Bypass: Any block that does not contain a colon inside the bold tag or immediately following it is ignored entirely and treated as normal prose. This prevents false positives on standard bolded sentence-starters (e.g. <strong>Warning</strong> This action is irreversible) without relying on brittle linguistic heuristics.
  5. Edge Cases & Limitations

    • JS-Rendered Content: If definitions are dynamically rendered via client-side React, Vue, or Angular applications, the crawler will parse an empty template or fallback element. This is a hard technical constraint of the static HTML crawler. No heuristic approximations or simulated evaluations are permitted for unrendered text.

What to store

FieldTypeComment
scanned_blocks_countINTEGERThe total number of block-level elements examined on the page.
matched_definitions_countINTEGERThe number of blocks that perfectly match the [Bold Term] : [Explanation] structure.
unmatched_definitions_countINTEGERThe number of blocks identified as definitions (having a colon inside or immediately outside the bold tag) but failing the strict spacing format.
has_definition_elementsBOOLEANFlag indicating whether any <dl>, <dt>, or definition-like structures are present on the page.
sample_violationsTEXTJSON array containing structured violation objects with raw HTML and classification type. Schema: Array<{raw_html: string, violation_type: 'enclosed_colon_violation' | 'whitespace_violation'}>

Condition for trigger

The following rules determine if this suggestion is surfaced to the user.

  • Trigger Rule 1: Non-Standard Definition Format Detected
    • Target Field: unmatched_definitions_count
    • Evaluation Logic: unmatched_definitions_count > 0
    • Severity: SUGGESTION
    • Diagnostic Message: "Some definition elements do not use a bolded term followed by a colon and a space. Standardizing this format improves readability and matches dictionary-style answer formats preferred by voice assistants."

Sources

Long description

Voice assistants (such as Google Assistant, Amazon Alexa, and Apple Siri) and search engine featured snippet parsers look for highly structured textual patterns to answer conversational, dictionary-style queries (e.g., "What is a crawler?").

When a crawler or indexing bot encounters a page, it parses content semantically. While semantic HTML elements like <dl> (description list), <dt> (description term), and <dd> (description details) provide excellent semantic structure, real-world search algorithms often rely on simple visual-typographical patterns to extract clean answers directly. A term emphasized via a bold tag (<strong> or <b>), immediately followed by a colon, and then followed by a clear, concise sentence structure serves as a highly readable, deterministic signature for natural language processing (NLP) models.

Common failure patterns detected by the crawler include:

  • Enclosed Colons (enclosed_colon_violation): The colon is accidentally wrapped inside the bold element: <strong>Crawler:</strong> A script that downloads web pages. This confuses parsers expecting the raw term to be separated from the explanation by an external boundary. Although frequently used natively in UI forms or key-value metadata tables, this format is highly disruptive to automated voice semantic engines.
  • Missing Spaces (whitespace_violation): Missing horizontal whitespace after the colon: <strong>Crawler</strong>:A script... which leads to poor text flow and tokenization errors.

How to Fix

To resolve this issue and optimize your site's content for voice assistants and featured snippets, update your HTML definition patterns to adhere to the following strict layout:

  1. Wrap only the target term or word inside a <strong> or <b> tag. Do not include any punctuation marks inside this tag.
  2. Place the colon character (:) immediately outside the closing tag of the bold element. (Note: While crawler engines are written to flexibly tolerate spacing directly before the colon to prevent parser errors, placing it immediately flush with the closing tag is the safest best-practice for all search consumers).
  3. Ensure there is at least one blank space after the colon before starting the text explanation.
  4. Ensure the explanation begins with a capital letter and forms a grammatically correct, self-contained sentence.

Example of standard compliance:
<strong>Metadata</strong>: Structured information that describes, explains, locates, or otherwise makes it easier to retrieve, use, or manage an information resource.