ウェブ学のすすめ

Study of Web Design & Programing

外部リソースを埋め込む「object要素」|HTML5課題15

課題

地図のPDFを表示させなさい。

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

解答

プレビュー

スマートフォンの方はこちらからプレビューできます。
外部リソースを埋め込む「object要素」

コード
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>外部リソースを埋め込む「object要素」</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>地図のPDFを表示</h1>
<object data="http://webgaku.hotcom-web.com/image/map.pdf" width="600" height="400">
<p><img src="http://webgaku.hotcom-web.com/image/map.jpg" alt="地図PDFのサムネイル"></p>
<p><a href="http://webgaku.hotcom-web.com/image/map.pdf">PDFのダウンロード</a></p>
</object>
</body>
</html>

ポイント

  • object要素:外部リソースを埋め込む