Complete list of HTML/Javascript event handlers with examples
Event handlers should be used in the correct way; it is advisable not to write them directly in tag attributes, but to install event handlers in included files with JavaScript code. If the jQuery library is used, then the name of the handlers must be written without the on prefix.
pushState() and replaceState() methods for adding and changing history entries in combination with the onpopstate event
pushState() allows you to change the referrer that is used in the HTTP header for XMLHttpRequest objects created after the state change. The value of referrer will be the URL of the document whose window is this at the time the XMLHttpRequest object is created.
Complete list of global HTML attributes with examples
Global attributes can be specified for any HTML element, even those not specified in the standard. This means that all non-standard elements must allow these attributes, even if using these elements means that the document is no longer HTML compliant.
Global attribute contenteditable
Informs that the element is available for editing by the user – you can delete text and enter a new one. Standard commands like undo, paste text from the buffer, etc. also work. Compatible with all browsers. Attribute contenteditable has a fixed set of values, it can be an empty string, true or false. Empty string or true indicate that the element is editable.
Global autofocus attribute
The autofocus attribute sets the default automatic input focus for HTML form fields when the page loads. The element that has the autofocus attribute set will have focus when the page loads (the cursor will blink in it if you start typing text from the keyboard – it will fall into the field with input focus). The attribute is an attribute without a value. It should be applied to the input, button or textarea tags and only one element per page, otherwise there will be a conflict.
Global class attribute
The global class attribute is a space-separated list of case-dependent classes of an element. Classes allow CSS and Javascript to select and access them using class selectors or functions such as the DOM document.getElementsByClassName methods. Developers use the class attribute all the time. Not only does it make styling easier, but it also helps keep your code organized and maintainable.