ルビを振る「ruby要素」|HTML5課題07
解答
プレビュー
↓スマートフォンの方はこちらからプレビューできます。
ルビを振る「ruby要素」
コード
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>ルビを振る「ruby要素」</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> <section> <h1>地名にルビを振る</h1> <p> <ruby> 日本橋<rt>にほんばし</rt> </ruby> </p> </section> <section> <h1>ルビに対応していないブラウザでも見えるようにする</h1> <p> <ruby> 日本橋<rp>(</rp><rt>にほんばし</rt><rp>)</rp> 萱場町<rp>(</rp><rt>かやばちょう</rt><rp>)</rp> </ruby> </p> </section> </body> </html>
ポイント
- ruby要素:ルビを振る