Inline elements

The following elements can all wrap text- and block-level elements to give them functionality, style, and meaning.


The a element is the anchor element. This is where HTML gets the HyperText (HT), the syntax is as follows:

<a download href media ping rel target type></a>


Here are the attributes that are used in the a element:

  • download: This attribute lets the browser know that the item should be downloaded. The dialog will default to the filename in this attribute.
  • href: This is the link target.
  • media: This states the media that the stylesheet should apply to based on a media query.
  • ping: This makes a URL to ping and notify if the link is followed.
  • rel: This states the relationship of the document being linked to.
  • target: This ...

Get Web Developer's Reference Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.