FIND YOUR NEXT FEW LINES

Results for “HTML”

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

503 snippets foundClear filters
HTMLDocument structure

Declare document language and encoding

Set the HTML language, UTF-8 encoding and viewport for accessible responsive content.

HTML✓ Tested
HTMLGetting Started

Declare the document language and encoding

HTML: Learn how to declare the document language and encoding in a complete browser example.

HTML✓ Tested
HTMLGetting Started

Describe terms in a definition list

HTML: Learn how to describe terms in a definition list in a complete browser example.

HTML✓ Tested
HTMLForm behavior

Disable a related group of controls

HTML: A disabled fieldset prevents editing its descendant controls and omits them from form submission.

HTML✓ Tested
HTMLNative disclosure & dialogs

Dismiss a modal with the Escape key

HTML: Native modal dialogs provide keyboard dismissal and return focus to their invoker.

HTML✓ Tested
HTMLNative disclosure & dialogs

Display a calculated form result

HTML: An output element can name the input controls contributing to its value.

HTML✓ Tested
HTMLGetting Started

Display a short code sample

HTML: Learn how to display a short code sample in a complete browser example.

HTML✓ Tested
HTMLData & disclosure

Display code as text

Escape angle brackets in preformatted HTML code samples.

HTML✓ Tested
HTMLGetting Started

Display reserved characters as text

HTML: Learn how to display reserved characters as text in a complete browser example.

HTML✓ Tested
HTMLImages & embedded documents

Draw a basic rectangle on a labeled canvas

HTML: Canvas requires script to draw pixels; provide alternative content and an accessible label.

HTML✓ Tested
HTMLImages & embedded documents

Exclude a purely decorative image from accessible content

HTML: An empty alt indicates that this image adds no information beyond nearby content.

HTML✓ Tested
HTMLText semantics

Expand an abbreviation with explanatory text

HTML: The title attribute supplies the full form while nearby text remains useful without hovering.

HTML✓ Tested