让<img/>像搜索引擎中的文字一样

时间:2016-03-09 13:22:34

标签: html image seo

我的图片上有电话号码:

showing a telephone number

我想通过搜索&#34; 1-700-700-690&#34;让其他人找到此图片所在的页面。在谷歌上。就像HTML标记一样:

<img alt="1-700-700-690" src="http://hashef.co.il/wp-content/uploads/2013/12/Moked-Telephoni2.png" width="295" height="62" />

我试过了:

<?php
    $link = mysqli_connect($host, $user, $password, $database) or die(mysqli_error($link));
    $query = "SELECT * FROM table1 ORDER BY name";
    $result = mysqli_query($link, $query) or die(mysqli_error($link));
    if(mysqli_num_rows($result) > 0){
        ?>
        <table>
            <thead>
                <tr>
                    <th>NAME</th>
                    <th>AGE</th>
                    <th>LINK</th>
                </tr>
            </thead>
            <tbody>
                <?php
                while ($row = mysqli_fetch_array($result, MYSQL_ASSOC)) {
                    echo '<tr>
                        <td>'.$row['name'].'</td>
                        <td>'.$row['age'].'</td>
                        <td><a href="other.php?id='.$row['id'].'">[VIEW]</a></td>
                    </tr>';
                }
                ?>
            </tbody>
        </table>
        <?php
    }else{
        echo 'No results found.';
    }
?>

但它不起作用(尝试在Google上找到该页面)。

有没有这样做?

1 个答案:

答案 0 :(得分:1)

这两种解决方法中的一种可能适合您:

1)直接在图片之前或之后放置<p>1-700-700-690</p>,并将font-size设置为1px,并将字体颜色更改为背景颜色。

2)在脑海中使用包含电话号码的<meta>标签。这应该有助于您的页面索引。文档可以直接在Google上找到,例如see this link here.