2014年11月12日水曜日

開発環境

Head First HTML and CSS (Elisabeth Robson (著)、 Eric Freeman (著)、O'Reilly Media )のChapter 5(Adding Images to your Pages: Meeting the Meia)、EXERCISE(p.198)を解いてみる。

入出力結果(Terminal)

$ ls -R
./  html/  photos/
../  index.html thumbnails/

./html:
./   ../   seattle_downtown.html

./photos:
./   ../   seattle_downtown.jpg*

./thumbnails:
./   ../   seattle_downtown.jpg*
$

HTML (BBEdit, Emacs)

index.html

<html>
  <head>
    <title>myPod</title>
    <style type="text/css">
      body { background-color: #eaf3da;}
    </style>
  </head>
  <body>
    <h1>Welcome to myPod</h1>
    <p>
      …
    </p>
    <h2>Seattle, Washington</h2>
    <p>
      …
    </p>
    <p>
      <a href="html/seattle_downtown.html" title="Downtown Seattle">      
        <img alt="An iPod in downtown Seattle, WA" src="thumbnails/seattle_downtown.jpg">
      </a>
    </p>
  </body>
</html>

html/seattle_downtown.html

<html>
  <head>
    <title>Downtown Seattle</title>
    <style type="text/css">
      body { background-color: #eaf3da;}
    </style>
  </head>
  <body>
    <h1>Seattle, Washington</h1>

    <p>
      <img alt="An iPod in downtown Seattle, WA" src="../photos/seattle_downtown.jpg">
    </p>
  </body>
</html>

0 コメント:

コメントを投稿