Chapter 2
Chapter 2
TM L 5
Ninth Edition
Chapter 2
HTML Basics
Copyright © 2019, 2017, 2015 Pearson Education, Inc. All Rights Reserved
What is HTML?
HTML: The set of markup symbols or codes placed in a file
intended for display on a Web browser page.
HTML5 DTD
<!DOCTYPE html>
Head Section
Contains information that describes the web page document
<head>
…head section info goes here
</head>
Body Section
Contains text and elements that display in the web page document
<body>
…body section info goes here
</body>
chapter2/paragraph.html
<blockquote>
…text goes here…
</blockquote>
<b> bold text Text that has no extra importance but is styled in bold font by usage and
convention
<em> emphasized Causes text to be emphasized in relation to other text; usually displayed in
text italics
<i> italicized text Text that has no extra importance but is styled in italics by usage and
convention
<mark> mark text Text that is highlighted in order to be easily referenced (HTML5 only)
<small> small text Legal disclaimers and notices (“fine print”) displayed in small font-size
<strong> strong text Strong importance; causes text to stand out from surrounding text; usually
displayed in bold
<sub> sub text Displays a subscript as small text below the baseline
<sup> sup
text Displays a superscript as small text above the baseline
BROWSER DISPLAY:
Call for a free quote for your web development needs: 888.555.5555
Unordered List
Ordered List
Description List
formerly called a definition list
<ul>
Contains the unordered list
<li>
Contains an item in the list
◦ <dl>
Contains the description list
◦ <dt>
Contains a term/phrase/sentence
Configures empty space above and below the text
◦ <dd>
Contains a description of the term/phrase/sentence
◦ Indents the text
◦ Configures empty space above and below the text
nav Element
<nav></nav>
Contains web page
document’s main navigation
main Element
<main></main>
Contains the web page
document’s main content
footer Element
<footer></footer>
Contains the web page
document’s footer
Copyright © Terry Felke-Morris http://terrymorris.net 35
HTML5
Structural
Elements
<body>
<header> document headings go here </header>
<nav> main navigation goes here </nav>
<main> main content goes here </main>
<footer> document footer information goes here </footer>
</body>
Character Code
© ©
< <
> >
& &
&
href Attribute
Indicates the file name or URL
<a href="http://yahoo.com">Yahoo</a>
Relative link
◦ Link to pages on your own site
<a href="index.htm">Home</a>
48
Hands-on practice 2.13
(pages 53-56)
chapter2/2.13/index.html
chapter2/2.13/services.html
chapter2/2.13/contact.html
<a href=“mailto:[email protected]”>[email protected]</a>