Web Playground Logo

Web Playground

HTML Attributes Reference

This page provides a reference for HTML attributes. It lists common attributes and their usage.


Attribute Belongs to Description
lang Global Specifies language of the content
title Global Provides extra info about an element. Shows up as a tooltip when the mouse hovers over the element
style Global CSS styling for an element
src <audio>, <embed>, <iframe>, <img>, <input>, <script>, <source>, <track>, <video> URL source of a media file
href <a>, <area>, <base>, <link> Hypertext Reference; URL of the page being linked
height <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video> Specifies the height of the element
width <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video> Specifies the width of the element
alt <area>, <image>, <input>, Alternate text for when element fails to display
usemap <img> Specifies a map to be used with the image
coords <area> Specifies the coordinates of the clickable area
shape <area> Specifies the shape of the clickable area
span <col> Specifies the number of columns a <col> element should span
scope <th> Specifies which cells the header cell applies to. Can be "col", "row", "colgroup", or "rowgroup"
onclick Global Specifies the JavaScript code to be executed when the element is clicked
placeholder placeholder placeholder
placeholder placeholder placeholder
placeholder placeholder placeholder
placeholder placeholder placeholder