Sha256: ebfbf2b71f8baa2afffc8f443623090829b2baaa8523f1a8356ab2879307eaed

Contents?: true

Size: 1.05 KB

Versions: 12

Compression:

Stored size: 1.05 KB

Contents

---
sort: 6
---

# Attributes

Optionally specify any number of HTML attributes. These will be combined with
any which you've set in a preset.

All arguments which begin with `--` (including `--link`) must be at the end of
the liquid tag, but they can be given in any order.

- **`--alt`**

  _Format:_ `--alt (alt text)`

  _Example:_ `--alt Here is my alt text!`

  Convenience shortcut for `--img alt="..."`

- **`--(element)`**

  _Format:_ `--(picture|img|source|a|parent) (Standard HTML attributes)`

  _Example:_ `--img class="awesome-fade-in" id="coolio" --a data-awesomeness="11"`

  Apply attributes to a given HTML element. Your options are:

  - `--picture`
  - `--img`
  - `--source`
  - `--a` (anchor tag)
  - `--parent`

`--parent` will be applied to the `<picture>` if present, otherwise the
`<img>`; useful when using an `auto` output format.

```note
Attributes that are set here for elements which don't occur in the selected
markup format will be ignored (e.g. adding `--picture class="cool-css"` with a
preset that does not use a `<picture>` tag).
```

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
jekyll_picture_tag-2.1.2 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.1.1 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.1.0 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.0.4 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.0.3 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.0.2 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.0.1 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.0.0 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-2.0.0pre1 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-1.14.0 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-1.13.0 docs/users/liquid_tag/argument_reference/attributes.md
jekyll_picture_tag-1.12.0 docs/users/liquid_tag/argument_reference/attributes.md