MCS-170 The Nature of Computer Science

Chapter 2 - Part I

1. World Wide Web

2. HTML General Information

bold text
bold and italics text
just italics text

3. HTML Document Structure

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

begin document body
               text and images will be written here
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
<h1> begin heading type 1. (Large Heading) also h2, h3, h4, etc. YES
begin bold text YES
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
<br> breaks the line and puts the rest on the next line without a blank line NO
horizontal line acroos the width of the browser window
begin hyperlink--form is
<a href="ADDRESS">Text for label</a>
Example: <a href="">Books</a>
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
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