Results for “HTML”
Small, practical examples. Search by task or narrow things down below.
Rotate a rectangular box around its center
CSS: A ninety-degree transform swaps the visible bounding-box width and height.
CSS✓ Tested
Round a box’s corners
CSS: Border-radius changes the corner shape without changing its rectangular layout dimensions.
CSS✓ Tested
Round a panel’s corners
CSS: Learn how to round a panel’s corners in a complete browser example.
CSS✓ Tested
Run an event handler once
Use jQuery one for a handler that removes itself after the first event.
jQuery✓ Tested
Run cleanup after an AJAX failure
jQuery: always runs on success or failure and can clear loading state.
jQuery✓ Tested
Run code after the document is ready
jQuery: Learn how to run code after the document is ready in a complete browser example.
jQuery✓ Tested
Scale a value from the root font size
CSS: Rem units follow the document root instead of accumulating through nested font sizes.
CSS✓ Tested
Scale text within limits
Use CSS clamp to bound responsive font sizing.
CSS✓ Tested
Scope a component’s styles
Scope a component’s styles with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Scroll wide code locally
Keep long code inside a horizontally scrollable CSS container.
CSS✓ Tested
Select a range from a collection
jQuery: slice includes the start index and excludes the end index.
jQuery✓ Tested
Select all elements with a class
jQuery: Learn how to select all elements with a class in a complete browser example.
jQuery✓ Tested