ウェブ学のすすめ

Study of Web Design & Programing

上付き文字を表示する「sup要素」|HTML5課題09

課題

面積の単位を表示させなさい。

引用元テキストの論理構造(2) - Webデザインの勉強|忘筌

解答

プレビュー

スマートフォンの方はこちらからプレビューできます。
上付き文字を表示する「sup要素」

コード
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>上付き文字を表示する「sup要素」</title>
<link rel="stylesheet" href="#">
<script src="#"></script>
<!--[if lte IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lte IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<style>
  article, aside, dialog, figure, footer, header,
  hgroup, menu, nav, section { display: block; }
</style>
</head>
<body>
<h1>面積の単位を表示</h1>
<p>1辺の長さが1メートルの正方形の面積は、1m<sup>2</sup>と表します。</p>
</body>
</html>

ポイント

  • sup要素:上付き文字を表示する