MCS-170 The Nature of Computer Science

Chapter 2 - Part I


1. World Wide Web

2. HTML General Information

<p>
<b>
bold text
<i>
bold and italics text
</i>
</b>
<i>
just italics text
</i>
</p>

3. HTML Document Structure

HTML tags  What they are used for
<html> begin html document
    <head>
begin document head
      <title>
begin title
                            actual page title
      </title>
end title
    </head>
end document head

    <body>
begin document body
               text and images will be written here
    </body>
end document body

</html> end HTML

4. HTML Body Structure

Formatting tag Use Does it need a closing tag?
<center> used to center a section of text or images YES
<p> begin paragraph (a blank line will be left between paragraphs) YES
<div> Division Tag, like a paragraph but more flexible. Can be used to combine multiple page elements as one group
YES
<h1> begin heading type 1. (Large Heading) also h2, h3, h4, etc. YES
<b>
begin bold text YES
<i>
begin italics text YES
<u> begin underline text YES
<sub> begin subscript text YES
<sup> begin superscript text YES
<s> put a cross-out line through the text YES
<span> define an area of text within a paragraph
YES
<br> breaks the line and puts the rest on the next line without a blank line NO
<hr>
horizontal line acroos the width of the browser window
NO
<a>
begin hyperlink--form is
<a href="ADDRESS">Text for label</a>
Example: <a href="http://www.amazon.com">Books</a>
YES
<img>
inage tag--form is
<img src="ADDRESS" alt="text description"/>
Example: <img src="bugs.gif" alt="Bugs Bunny Image"/>
Note:  GIF or JPEG images only
NO
STYLE Parameter Examples (used inside a tag)
style = "color:blue"
style = "text-align:right"
used to affect style of text--change font colour or alignment (or other style attributes)
Example: <p style ="text-align:right"> starts a paragraph section that will be right aligned.
Example: <span style="color:red"> starts a span of text that will be colored red.
NO - used inside of a tag