Adding rel: 'nofollow, noindex' at once to link

Viewed 99

In my Rails application I would like to add nofollow, noindex to few links. However I am not sure whether I need to add comma(,) or not.

Which one is correct ?

1. <%= link_to 'Apply', apply_new_path, rel: 'nofollow, noindex' %> # with comma(,)

or

2. <%= link_to 'Apply', apply_new_path, rel: 'nofollow noindex' %> # no comma(,) used here
1 Answers

The rel attribute on a and area elements controls what kinds of links the elements create. The attribute's value must be an unordered set of unique space-separated tokens.

Related