FIND YOUR NEXT FEW LINES

Results for “attr”

Small, practical examples. Search by task or narrow things down below.

35 snippets foundClear filters
HTMLMetadata & document links

Mark the language of a phrase inside a page

HTML: An element-level lang attribute identifies a language change within the document.

HTML✓ Tested
HTMLLinks & accessibility

Mark up a machine-readable date

Pair a readable date with an ISO datetime attribute in HTML.

HTML✓ Tested
HTMLMetadata & document links

Offer a downloadable text file

HTML: The download attribute supplies a filename for this same-document data URL.

HTML✓ Tested
PowerShellStructured formats & encodings

Read a value from a trusted XML document

PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.

PowerShell✓ Tested
HTMLInput constraints

Require a nonempty text value

HTML: The required attribute makes an empty text control fail native constraint validation.

HTML✓ Tested
HTMLImages & embedded documents

Reserve an image’s display dimensions

HTML: Width and height attributes supply a known display size and aspect ratio before decoding finishes.

HTML✓ Tested
jQueryText & attributes

Set a form field value

Populate a labeled input with jQuery val.

jQuery✓ Tested
jQueryText & attributes

Set text safely

Use jQuery text to insert literal content instead of interpreting HTML.

jQuery✓ Tested
HTMLNative disclosure & dialogs

Start a disclosure open while keeping it collapsible

HTML: The open attribute sets the initial details state without JavaScript.

HTML✓ Tested
jQueryForm serialization & state

Store an object associated with an element

jQuery: data retains JavaScript values without serializing them into HTML attributes.

jQuery✓ Tested
HTMLInput constraints

Validate a structured text identifier

HTML: The pattern attribute matches the entire nonempty input; required handles the empty case.

HTML✓ Tested