html中p元素添加超链接

How To Build a Website With HTML 如何使用HTML构建网站

This tutorial series will guide you through creating and further customizing this website using HTML, the standard markup language used to display documents in a web browser. No prior coding experience is necessary but we recommend you start at the beginning of the series if you wish to recreate the demonstration website.

本教程系列将指导您使用HTML(用于在Web浏览器中显示文档的标准标记语言)创建和进一步自定义此网站 。 不需要任何编码经验,但是如果您希望重新创建演示网站,建议您从本系列的开头开始 。

At the end of this series, you should have a website ready to deploy to the cloud and a basic familiarity with HTML. Knowing how to write HTML will provide a strong foundation for learning additional front-end web development skills, such as CSS and JavaScript.

在本系列的最后,您应该拥有一个可以部署到云的网站,并且对HTML有了基本的了解。 知道如何编写HTML将为学习其他前端Web开发技能(例如CSS和JavaScript)奠定坚实的基础。

This tutorial will walk you through the steps of adding hyperlinks to your webpage.

本教程将引导您完成将超链接添加到网页的步骤。

Hyperlinks can be added to text or images with the anchor link element <a>. The <a> tag requires the attribute href, which is used to specify the destination link. The <a> element is used like this:

可以使用锚链接元素<a>链接添加到文本或图像。 <a>标记需要属性href ,该属性用于指定目标链接。 <a>元素的用法如下:

<a href="www.DestinationLink.com">The text you want to link</a>

Try adding the code snippet below to your “index.html” file and changing the sample highlighted text with a real link, such as https://digitalocean.com/community:

尝试将以下代码片段添加到“ index.html”文件中,并使用真实链接(例如https://digitalocean.com/community更改示例突出显示的文本:

<a href="https://www.digitalocean.com/community">The text you want to link</a>

(If you have not been following the tutorial series, you can review instructions for setting up an index.html file in our tutorial Setting Up Your HTML Project. Save the file and load it in your browser.

(如果您还没有按照本教程系列进行操作,则可以在我们的教程“ 设置HTML项目”中查看有关设置index.html文件的说明。保存该文件并将其加载到浏览器中。

You should receive an output like this:

您应该收到如下输出:

You can also link images by wrapping an image element with an <a> element like so:

您还可以通过将图像元素包装为<a>元素来链接图像,如下所示:

<a href="https://www.digitalocean.com/community">The text you want to link
<img src="https://html.sammy-codes.com/images/small-profile.jpeg">
</a>

Try testing the code snippet in your browser to check that it works. You should now understand how to add hyperlinks to text and images on your webpage.

尝试在浏览器中测试代码段,以检查其是否有效。 现在,您应该了解如何在网页上向文本和图像添加超链接。

翻译自: https://www.digitalocean.com/community/tutorials/how-to-add-hyperlinks-in-html

html中p元素添加超链接

html中p元素添加超链接_如何在HTML中添加超链接相关推荐

  1. javascript字典中添加数组_如何在JavaScript中使用数组方法:Mutator方法

    JavaScript中的数组由元素列表组成.JavaScript有许多有用的内置方法来处理数组.修改原始数组的方法称为mutator方法,返回新值或表示的方法称为accessor方法.在本教程中,我们 ...

  2. wordpress添加媒体_如何在WordPress中添加新帖子并利用所有功能

    wordpress添加媒体 Are you trying to create a new post in WordPress? Do you want to learn about all the W ...

  3. ios表格添加底纹_如何在Word中的表格单元格中添加底纹

    ios表格添加底纹 If you have a table with many rows and columns, it can be difficult to read. Adding shadin ...

  4. wordpress添加媒体_如何在WordPress中添加jQuery FAQ手风琴

    wordpress添加媒体 Recently one of our users asked us if there was a way for them to add a FAQ accordion ...

  5. wordpress添加媒体_如何在WordPress中添加精选内容滑块

    wordpress添加媒体 Do you want to add a featured content slider like Yahoo or ESPN? Many popular sites us ...

  6. wordpress添加媒体_如何在WordPress中添加社交媒体共享计数小部件

    wordpress添加媒体 Earlier on this blog, we created a Social Media Cheat Sheet for WordPress, but that on ...

  7. wordpress添加媒体_如何在WordPress中添加电子书下载

    wordpress添加媒体 Do you want to add ebook downloads to your WordPress site? WordPress makes it easy for ...

  8. php oracle 操作 sql语句中能不能添加数组_如何在PHP中使用Oracle数据库_php

    在php3.0以上版本中,php内置了几乎目前所有的数据库处理函数,包括oracle;在本文中我们通过一个实例来介绍了如何使用这些函数来操作Oracle数据库. PHP提供了2大类API(应用程序接口 ...

  9. word中 有注释标签吗_如何在Word中注释图像

    word中 有注释标签吗 If you're writing a document that includes images, you may want to add annotations to t ...

最新文章

  1. Asp.net 的网络打印 – Javascript 控制打印
  2. 重记解决kube-dns故障一则---ceph惹的祸
  3. 在周末程序员可以做些什么?
  4. Science nature合集 2021年度上半年
  5. 基于Boost::beast模块的协程HTTP服务器
  6. 81. 搜索旋转排序数组 II
  7. python怎么清理垃圾_Python 中的“垃圾”是怎么回收的?
  8. 大数据时代投资者应如何利用数据资源盈利
  9. 【人脸识别】基于matlab GUI LBP人脸识别【含Matlab源码 1282期】
  10. 盘点2017 CES展会所有亮眼黑科技 (下)
  11. 名校400门免费人文社科公开课视频合集!
  12. Python中制表符\t的使用
  13. 【游戏建模全流程】ZBrush生物模型雕刻教程:豹纹壁虎
  14. 从15亿到5000亿 eBay收购PayPal成硅谷传奇
  15. 10.8 UiPath 数据筛选Filter Data Table的介绍和使用(Excel数据写入另一个Excel中)
  16. Mycat分库分表原理
  17. 在线拍照的flash
  18. 2021年全国各地区居民人均可支配收入排行榜:上海、北京人均可支配收入超过7万元,8个省份高于全国平均水平(附年榜TOP31详单)
  19. CSS浮动与清除浮动
  20. 输入一个字符串,内有数字和非数字,例如:A123x456 17960,将其中连续的数字作为一个整数,依次放到一数组a中。例如,123放在a[0],456放在a[1],统计共有多少个整数,并输出这些数。

热门文章

  1. 《iOS防护02》破解ptrace防护
  2. 亲测3种个人在线网站建设的方法
  3. linux内核设置mac地址,Linux下如何修改网卡MAC地址
  4. maven阿里镜像下载jar包报错
  5. 托福100分什么水平
  6. S3C2440之IIC裸机驱动
  7. 电脑设置了从睡眠中唤醒需要密码却没生效(已解决)
  8. 数据的入库操作 实验python_python操作MySQL数据库
  9. 【行为识别综述准备】
  10. 《软件方法》第8章 分析 之 分析类图(2)