【发布时间】:2013-05-09 13:25:52
【问题描述】:
我想使用 PHP 包含一个图像 alt 属性。
我目前有以下代码...
<?php echo img(IMAGEPATH . 'logo.png'); ?>
我将如何使用 PHP 向该图像添加 alt 属性 - “我的真棒 alt”,以便当我进入查看源代码时,我会在图像中看到类似的内容?
<img src="http://examplesite.com/img/logo.png" alt="my awesome alt"/>
我正在使用 codeigniter。
【问题讨论】:
-
学究气:它是一个 alt 属性,而不是一个 alt 标签。 IMG 是标签; ALT 是一个属性。
-
user guide 很好地解释了这一点。
-
我们是不再看文档,还是直接来到 stackoverflow 并开始发布问题?
-
你想打多少赌他不会接受答案!
标签: php image codeigniter alt