pagetaka

写真、PC、ネット、岡山、旅の話題をお届けします

Wordで作るホームページ:冗長な記述が…

Wordの保存形式のひとつに「Web」関連のページを書き出す種類がいくつかあります。

  • 名前を付けて保存→その他の形式→Webページ(フィルタ後) とすれば、Wordからの書き出しとしては、最小のhtml形式で保存できます。この下は、その書き出した結果です。
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"MS 明朝";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
	{font-family:"MS ゴシック";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
	{font-family:Century;
	panose-1:2 4 6 4 5 5 5 2 3 4;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:"\@MS ゴシック";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
	{font-family:"\@MS 明朝";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0mm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Century","serif";}
h1
	{mso-style-link:"見出し 1 \(文字\)";
	margin:0mm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:normal;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
	{mso-style-link:"表題 \(文字\)";
	margin-top:12.0pt;
	margin-right:0mm;
	margin-bottom:6.0pt;
	margin-left:0mm;
	text-align:center;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
	{mso-style-link:"副題 \(文字\)";
	margin:0mm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";}
span.1
	{mso-style-name:"見出し 1 \(文字\)";
	mso-style-link:"見出し 1";
	font-family:"Arial","sans-serif";}
span.a
	{mso-style-name:"表題 \(文字\)";
	mso-style-link:表題;
	font-family:"Arial","sans-serif";}
span.a0
	{mso-style-name:"副題 \(文字\)";
	mso-style-link:副題;
	font-family:"Arial","sans-serif";}
.MsoPapDefault
	{text-align:justify;
	text-justify:inter-ideograph;}
 /* Page Definitions */
 @page WordSection1
	{size:595.3pt 841.9pt;
	margin:99.25pt 30.0mm 30.0mm 30.0mm;
	layout-grid:18.0pt;}
div.WordSection1
	{page:WordSection1;}
-->
</style>
</head>
<body lang=JA style='text-justify-trim:punctuation'>
<div class=WordSection1 style='layout-grid:18.0pt'>
<p class=MsoTitle><span style='font-family:"MS ゴシック"'>表題</span></p>
<p class=MsoSubtitle><span style='font-family:"MS ゴシック"'>副題</span></p>
<h1><span style='font-family:"MS ゴシック"'>見出し</span></h1>
<p class=MsoNormal><span style='font-size:12.0pt;font-family:"MS ゴシック"'>本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です</span></p>
<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
</div>
</body>
</html>

スタイル(CSS)を外部書き出ししていないので、なお冗長に見えます。これが、Word独特のタグを削除してない書き出し方になると、いかほどのものか、…ああ、恐ろしい…ということになるかと。まあ、まだシッカリ残ってますけど…
誤解を恐れずに簡略化すると、

<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<title>表題</title>
</head>
<body>
<div>
<h1>表題</h1>
<h2>副題</h2>
<h3>見出し</h3>
<p>本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です本文です</p>
</div>
</body>
</html>

ということになるでしょうか。Wordの場合、文章そのものより、装飾部分があまりにも多いのがわかるかと思います。ネットに載せて伝えたいのは、装飾ではなく文章そのものだと、思い至ることが大切かと。かといって、ほかに手段が手元に無ければ、致し方ない…発信しないよりは…ということもああるのかと…。さて…