alt タグや title タグにテキストを挿入するために PHP を使用するのは良い習慣ですか? 検索エンジンはタイトルタグを読み取ることができますか、それともコードを見るだけですか?
これは基本的に私が目指していたものです
<?php
$title = “testing 123" ;
?>
<h2><?php echo $title; ?></h2>
<img src="images/test/test01.jpg" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" />
それともこれだけやったほうがいいですか?
<h2><?php echo $title; ?></h2>
<img src="images/test/test01.jpg" alt=" testing 123" title=" testing 123" />
ご協力いただきありがとうございます。