{"visual_analysis_performed":true,"described_by":"Claude, looking at this picture alone, checked against the page's own text and the record","subject":"Saved copy of MDN's 'id' HTML global attribute page, with the first sentence of its 'Description' section boxed in red","image_role":"web_page_screenshot_source_passage","photo_type":"screenshot of our saved copy of a public web page","how_it_looks":"At the top is a pale grey strip with the small dark words \"URSY.com saved copy · read 2026-12-01\", and below it a white rounded address bar with the MDN address in dark sans-serif type inside a thin red box. The saved MDN page below is plain white and only partly styled. The wide left margin is almost empty; near its top is one cut-off menu word, \"autocapitalize\", which is not fully readable. Body text is a black sans-serif, with underlined blue links such as \"Document.querySelector()\", \"CSS identifiers\", \"CSS.escape()\" and \"manually\", and small light grey monospace chips such as \"my?id\", \"1234\", \"window.1234\" and \"window[\"1234\"]\". Then comes a large underlined black heading, \"Description\". Its first paragraph starts with a thin red rectangle round \"The purpose of the ID attribute is to identify a single element when linking\"; the text after it, \"(using a fragment identifier), scripting, or styling (with CSS).\", is outside the box. Below are a paragraph about the window object, two small code examples each marked \"html\" or \"js\" with a grey \"Copy\" button, '<p id=\"preamble\"></p>' and \"const content = window.preamble.textContent;\" in black monospace, and a pale pink warning panel with a red left edge, a red warning-triangle icon and a bold \"Warning:\"; its last line is cut off under the label. At the bottom is the URSY.com Truth Spine label: a light blue band under a strong blue top line. On the left, a grey line reads \"Website problem · AI answers and citations · official source: MDN\", then \"Sections that a link cannot point to\" in large bold navy type, then \"Source and record: ursy.com/truth-spine/I-0050/\". On the right is a rounded blue badge with white type \"URSY.com\", \"TRUTH SPINE\", \"FACT RECORD I-0050\". The bottom line reads \"Every fact on URSY.com is recorded with its source in the URSY.com Truth Spine. Explore them all at ursy.com/truth-spine\".","red_boxes":[{"where":"address strip, round the whole source address","words":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/id"},{"where":"first line under the 'Description' heading, middle of the page","words":"The purpose of the ID attribute is to identify a single element when linking"}],"colours":["white","black","link blue","light grey","pale orange","pale pink","red","navy","light blue","strong blue"],"logos_and_marks":["info icon on the orange demo panel","red warning triangle icon","no MDN logo in view","URSY.com Truth Spine badge (blue rounded rectangle, white type)"],"people":"none","quality":"Box area sharp and clean. The page is only partly styled: the left menu is blank apart from one cut-off word, and an orange demo panel overlaps the top two lines, about 400 px above the box.","reading_order_summary":[{"area":"address strip","text":"URSY.com saved copy · read 2026-12-01"},{"area":"address strip","text":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/id"},{"area":"demo panel (overlapping, top)","text":"The most exciting paragraph on the page. One of a kind!"},{"area":"body (top lines partly covered)","text":"Technically, the value for an ID attribute may contain any other Unicode character. However, when used in CSS selectors, either from JavaScript using APIs like Document.querySelector() or in CSS stylesheets, ID attribute values must be valid CSS identifiers. This means that if an ID attribute value is not a valid CSS identifier (for example, my?id or 1234) then it must be escaped before being used in a selector, either using the CSS.escape() method or manually."},{"area":"body","text":"For this reason, it's recommended that developers choose values for ID attributes that are valid CSS identifiers that don't require escaping."},{"area":"body","text":"Also, not all valid ID attribute values are valid JavaScript identifiers. For example, 1234 is a valid attribute value but not a valid JavaScript identifier. This means that the value is not a valid variable name, so you can't access the element using code like window.1234. However, you can access it using window[\"1234\"]."},{"area":"heading","text":"Description"},{"area":"body","text":"The purpose of the ID attribute is to identify a single element when linking","boxed":true},{"area":"body","text":"(using a fragment identifier), scripting, or styling (with CSS)."},{"area":"body","text":"You can access elements with ID attributes as global properties of the window object, where the property name is the ID value, and the property value is the corresponding element. For example, given this markup:"},{"area":"code example","text":"html Copy"},{"area":"code example","text":"<p id=\"preamble\"></p>"},{"area":"body","text":"You can access this paragraph element in JavaScript using the following code:"},{"area":"code example","text":"js Copy"},{"area":"code example","text":"const content = window.preamble.textContent;"},{"area":"warning panel","text":"Warning: Relying on the window[\"id-value\"] or window.idValue pattern is dangerous and discouraged because it can lead to unexpected conflicts with existing or"},{"area":"label","text":"Website problem · AI answers and citations · official source: MDN"},{"area":"label","text":"Sections that a link cannot point to"},{"area":"label","text":"Source and record: ursy.com/truth-spine/I-0050/"},{"area":"label badge","text":"URSY.com TRUTH SPINE FACT RECORD I-0050"},{"area":"label","text":"Every fact on URSY.com is recorded with its source in the URSY.com Truth Spine. Explore them all at ursy.com/truth-spine"},{"area":"note","text":"22 side-menu lines in the page data are not drawn on the picture and are not listed"}]}
