23 lines
669 B
Markdown
23 lines
669 B
Markdown
|
---
|
|||
|
title: Link to External Pages with Anchor Elements
|
|||
|
localeTitle: 链接到具有锚元素的外部页面
|
|||
|
---
|
|||
|
## 链接到具有锚元素的外部页面
|
|||
|
|
|||
|
在这个挑战中,你应该使用到目前为止所学到的一切。 HTML元素语法:
|
|||
|
|
|||
|
* 打开标签
|
|||
|
* 内容
|
|||
|
* 关闭标签
|
|||
|
|
|||
|
标签属性语法:
|
|||
|
|
|||
|
* `<tag`
|
|||
|
* 键=“值”
|
|||
|
* `>` ( `/>`在自动关闭标签的情况下)
|
|||
|
|
|||
|
你被要求给一个`a`标记的属性(键) `href`与价值`"http://freecatphotoapp.com"` ,并使用文本“猫的照片”为相同的内容`a`标签
|
|||
|
|
|||
|
### 资源
|
|||
|
|
|||
|
* [`<a>`标签 - href属性](https://guide.freecodecamp.org/html/attributes/a-href-attribute)
|