从网址创建可点击的网址 [英] Make a clickable url from a url
问题描述
这是我目前的代码行。
This is my current line of code.
<p> Linkedin: <?= $user_info['portfolio_website'] ?></p>
现在它只输出url as text。
如何使这个文本可以点击?
我尝试了什么:
我试图为它设置一个href但是它变得透明
Now it will just output the url as text.
How can I make this text clickable?
What I have tried:
I tried to put a href for it but then it turned transparent
推荐答案
user_info ['portfolio_website'] ?>< / p>
user_info['portfolio_website'] ?></p>
现在它只会输出网址作为文字。
如何我可以点击这个文字吗?
我尝试了什么:
我试图为它设置一个href但是它变得透明了
Now it will just output the url as text.
How can I make this text clickable?
What I have tried:
I tried to put a href for it but then it turned transparent
< p>是一个段落标记。 href属性不适用于< p>标签。
如需超级链接,您需要一个Anchor 标签。
<p> is a paragraph tag. The href attribute isn't applicable to <p> tags.
For a hyperlink you need an Anchor tag.
<p> Linkedin: <a href="xxxxxx">yyyyyy</a></p>
用你的网址替换xxxxxx (或php放置网址)并将yyyyyy替换为您想要显示的文字。
也许代替:
Replace xxxxxx with your url (or php to place the url) and replace yyyyyy with the text you'd like to appear.
Maybe instead:
<p><a href="xxxxxx">Linkedin</a></p>
也可用。
这篇关于从网址创建可点击的网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!