Escolar Documentos
Profissional Documentos
Cultura Documentos
3-2
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Hypertext
• Hypertext Markup Language (HTML)
• Markup languages describe the layout, formatting,
and look applied to a document’s abstract structure
– Margin width, indentations
– Font, text style, size, color
– Image placement, etc.
• Hyperlinks allow jumping from point to point in
documents (non-linear); links show as highlighted
words and images
• HTML realization of hypertext, and the Web, from Tim
Berners-Lee (1990s) (CERN - physics)
– Term “hypertext” is from Ted Nelson (1960s)
– Concept comes from Vannevar Bush (1940s)
3-3
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Marking Up with HTML
• HTML is Hypertext Markup Language
– Notation for specifying Web page content and formatting
• Hidden tags describe how words on a page should
look
– Called the “mark up”, gives font, size, color, bold,
indenting, etc.
• Formatting with Tags:
– Words or abbreviations enclosed in angle brackets < >
– Come in pairs (beginning and end):
• <title></title>
– Tags are not case-sensitive, but the actual text between
tags is
4-4
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Hypertext Philosophy
4-8
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Gather Your Tools
4-9
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Displaying the HTML Source File
4-10
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
4-11
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Brackets in HTML: The Escape
Symbol
• What if our web page needed to show a math
relationship like
0 < p > r
• The browser would interpret < p > as a paragraph
tag, and would not display it
• To show angle brackets, use escape symbol ( & ),
then an abbreviation, then a semicolon ( ; )
< displays as <
> displays as >
& displays as &
4-12
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Attributes for Image Tags
Browser will do as told, even to the point of
distorting images (original is 2400x2400 square)
<img src=“puffer.jpg” width=“200” height=“200” />
<img src=“puffer.jpg” width=“200” height=“100” />
<img src=“puffer.jpg” width=“100” height=“200” />
4-13
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Handling Lists
4-14
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Example (Nested Lists)
<ol> <li> Hydrogen, H, 1.008, 1 </li>
<li> Helium, He, 4.003, 2 </li>
<ul> <li> good for balloons </li>
<li> makes you talk funny </li> </ul>
<li> Lithium, Li, 6.941, 2 1 </li>
<li> Beryllium, Be, 9.012, 2 2 </li>
</ol>
Gets rendered as (browser indents each list some)
1. Hydrogen, H, 1.008, 1
2. Helium, He, 4.003, 2
• Good for balloons
• Makes you talk funny
3. Lithium, Li, 6.941, 2 1
4. Beryllium, Be, 9.012, 2 2
4-15
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Handling Tables
4-16
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Example Simple Table
<table>
<tr><th>A</th><th>B</th><th>C</th></tr>
<tr><td>Dan</td><td>Jen</td><td>Pat</td></tr>
<tr><td>Mary</td><td>Tim</td><td>Bob</td></tr>
</table>
Will display as:
A B C
Dan Jen Pat
Mary Tim Bob
4-17
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Wrap Up: Web Page Authoring
4-19
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley