Gist 1adbdacf6a95cfacb3cca1647ed20f39
✓ Published0🌍 Public
Aamundo
Last edited Jul 28, 2021
Created on Jul 28, 2021
This example shows every paragraph element on a page highlighted with a thick red border, transforming a plain HTML document into a visual checklist of text blocks. The script uses the standard Document Object Model (DOM) API, specifically `document.querySelectorAll('p')`, to select all paragraph nodes, then applies an inline CSS style via `p.style.border` with a `4px solid red` value. The rendering approach is direct DOM manipulation, with no external libraries or frameworks involved. The effect is immediate and static, permanently altering the appearance of each paragraph until the page is refreshed or the style is changed.
AI-generated description