htmlタグをphpで書く出す

<?php

header(‘Content-Type: text/html; charset=utf-8’);

?>

<?

$ab1 = ‘ページタイトル’;

$ab2 = ‘本文要約’;

$ab3 = ‘キーワード1,キーワード2,キーワード3’;

 

$ab4 = ‘本文タイトル’;

$ab5 = ‘本文’;

$ab6 = ‘キャブション’;

 

 

echo “<!DOCTYPE html PUBLIC ‘-//W3C//DTD XHTML 1.0 Transitional//EN’ ‘http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd’>”;

echo “<html><head>”;

echo “<meta http-equiv=’Content-Type’ content=’text/html; charset=utf-8′ />”;

// 本文要約;

echo “<meta name=’Description’ content=’$ab2′ />”;

// キーワード;

echo “<meta name=’Keywords’ content=’$ab3′ />”;

// ページタイトル;

echo “<title>$ab1</title>”;

echo “</head>”;

?>

 

 

 

<br />

<br />—————————————————

<br />htmlタグをphpで書く出す(PHP4用)

<br />—————————————————

 

<?

echo “<table width=’500′ height=’96’ border=’0′ cellpadding=’0′>”;

echo “<tr>”;

echo “<th width=’500′ height=’96’ bgcolor=’#123456′ valign=’middle’>”;

echo “<div align=’center’>”;

// ページタイトル;

echo “<strong><font color=’#FFFFFF’>$ab1</font></strong>”;

echo “</div>”;

echo “</th>”;

echo “</tr>”;

echo “</table>”;

 

 

echo “<table width=’500′ height=’96’ border=’0′ cellpadding=’5′>”;

echo “<tr>”;

echo “<th width=’180′ align=’left’ valign=’top’>”;

echo “<div align=’left’>”;

echo “<br /><a href=’page01.html’ target=’_self’>page01.html</a>”;

echo “ page01.htmlへ”;

echo “<hr />”;

echo “<a href=’page02.html’ target=’_self’>page02.html</a>”;

echo “ page02.htmlへ<br />”;

echo “<hr />”;

echo “<a href=’page03.html’ target=’_self’>page03.html</a>”;

echo “ page03.htmlへ<br />”;

echo “</div>”;

echo “</th>”;

echo “<th align=’left’ valign=’top’>”;

echo “<br />”;

// 本文タイトル;

echo “<strong>$ab4</strong>”;

// 本文;

echo “<h5>$ab5</h5>”;

echo “<img src=’http://blog.mkph.com/wp-content/uploads/2008/06/cimg2779.jpg’ width=’480′ alt=’写真の名前’ /><br />”;

// キャプション;

echo “<h5>$ab6</h5>”;

echo “</th>”;

echo “</tr>”;

echo “</table>”;

echo “<table width=’500′ height=’35’ border=’0′ cellpadding=’1′>”;

echo “<tr>”;

echo “<th width=’500′ height=’35’ bgcolor=’#123456′>”;

echo “<div align=’center’>”;

echo “<strong><font color=’#FFFFFF’>ここに制作者名でも入れましょう。</font></strong>”;

echo “</div>”;

echo “</th>”;

echo “</tr>”;

echo “</table>”;

 

echo “</body>”;

echo “</html>”;

?>