RSRobince Studio

HTML Elements and Attributes

An element is an opening tag, its content and its closing tag together, for example <p>Hello</p>. Elements can be nested inside one another.

Tags can carry attributes that give extra information. An attribute has a name and a value in quotes, written inside the opening tag:

<a href="https://example.com">Visit example</a>

Here href is the attribute and the URL is its value. Some elements are empty (no closing tag), such as the line break <br> and the image <img>.

Try it yourself

Loading editor…