• Introduction to HTML5 forms and new attributes. How to use HTML5 data attributes Global html attributes

    Attributes provide additional information about an element, and they are always defined in the start tag, regardless of whether it is a paired tag or a single tag.

    There are a number of attributes in HTML that universal and can be applied to almost any tag, which is why the attributes included in this group are called global attributes.

    Global attributes will be often encountered in the examples of this tutorial; I suggest you quickly review the attributes that we have already reviewed and familiarize yourself with the global attributes that will be discussed in upcoming articles:

    Questions and tasks on the topic

    Before moving on to the next topic, complete the practice assignment:


    Tip: Don't forget to define the language of the page content and elements where required. After you complete the exercise, inspect the page code by opening the example in a separate window to make sure you completed it correctly.

    To see a description and example of using the global attribute you are interested in, click on it or scroll down the page to its description.

    accesskey

    The accesskey attribute is used by browsers as a guide to create a keyboard shortcut that activates an element or gives it focus.

    Note: Before HTML5, the accesskey attribute could only be used with the following tags: ,