更改php echo

时间:2018-03-30 23:39:55

标签: php fonts echo

我在php echo中有一个html超链接,这本身花了我一段时间才能正常工作,代码如下:

echo "Guidance on Organisational Context can be found".'<a href="http://www.website.com/page.html" target="_blank"> here</a>';

我想要做的是更改整个文本的文本颜色,到目前为止我在google上找到的示例只更改超链接“here”的文本,否则我只是不知道如何将其他html插入现有的代码,任何建议都将不胜感激。

如果可能的话,我更喜欢#111111风格的颜色选择器

1 个答案:

答案 0 :(得分:0)

可以通过添加两行来解决这个问题:

echo '<span style="color:#f44242;text-align:left;">Guidance on Organisational Context can be found</span>';
echo " ".'<a href="http://www.website.com/page.html" style="color:#f44242" target="_blank"> here</a>'."<BR>";