Category: The DOM

Recent Post

Insert an element or HTML block before or after an existing element

Using the insertAdjacentElement() or insertAdjacentHTML() methods.

Using HTML data attributes in JavaScript and CSS

Data attributes allow you to store string data directly on HTML elements.

Using querySelector and querySelectorAll

Select elements from the DOM using the full power of CSS selector syntax.