--- id: bad87fee1348bd9aedf08820 title: Transformar uma imagem em um link challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cRdBnUr' forumTopicId: 18327 dashedName: turn-an-image-into-a-link --- # --description-- Você pode transformar elementos em links colocando-os dentro de um elemento `a`. Coloque a imagem dentro de um elemento `a`. Exemplo: ```html Three kittens running towards the camera. ``` Lembre-se de usar `#` como valor da propriedade `href` no elemento `a` para transformá-lo em um link inativo. # --instructions-- Coloque o elemento de imagem existente dentro do elemento `a` (*de âncora*). Uma vez feito isso, passe o cursor do mouse sobre a imagem. O ponteiro do cursor vai se transformar no ponteiro para clicar em links. A foto agora é um link. # --hints-- O elemento `img` deve estar dentro do elemento `a`. ```js assert($('a').children('img').length > 0); ``` O elemento `a` deve ser um link inativo com o atributo `href` definido com o valor `#`. ```js assert(new RegExp('#').test($('a').children('img').parent().attr('href'))); ``` Todos os elementos `a` devem ter uma tag de fechamento. ```js assert( code.match(/<\/a>/g) && code.match(//g).length === code.match(/CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

``` # --solutions-- ```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

```