■文字のサイズや色を指定したい


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>文字のサイズや色を指定したい</title>
</head>
<body>
<p>■文字のサイズや色を指定したい</p>
<script type="text/JavaScript">
<!--
num=2005;
document.write("<p>"+"文字のサイズを「5」に指定する。".fontsize(5)+"</p>");
document.write("<p>"+"文字をbigに指定する。".big()+"</p>");
document.write("<p>標準の文字サイズです。</p>");
document.write("<p>"+"文字をsmallに指定する。".small());
document.write("<p>"+"文字色を変更する".fontcolor("red")+"</p>");
document.write("<p>"+"数値を文字列に変換して指定する。"+String(num).fontsize(6)+"</p>");
</script>
</body>
</html>


★解説★