githubEdit

Area

The HTML <area> tag, implemented in Ruby.

Parameters

This component can take various optional configuration params, as well as all the canonical HTML global attributesarrow-up-right like id or class.

It is meant to be used within the <map> component.

alt (optional)

Expects a string that specifies an alternate text for the <area> tag. Required if the href attribute is present.

coords (optional)

Expects an array of integers that define the <area>'s coordinates. For more details, see the official documentationarrow-up-right.

download (optional)

Expects a string to specify the target that will be downloaded when a user clicks on the hyperlink.

href (optional)

Expects a string to specify the hyperlink target for the area.

hreflang (optional)

Expects a string to specify the language of the target URL.

media (optional)

Expects a string to specify what media/device the target URL is optimized for.

rel (optional)

Expects a string to specify the relationship between the current document and the target URL.

shape (optional)

Expects a string to specify the shape of the area: Default, rect, circle, poly.

target (optional)

Expects a string to specify where to open the target URL.

type (optional)

Expects a string to specify the media type of the target URL.

Examples

Example 1 - Basic usage

returns

Last updated

Was this helpful?