<p>
<b>
bold text
<i>
bold and italics text
</i>
</b>
<i>
just italics text
</i>
</p>
Each html page should consist of two sections: the head, where general information
about the page is specified (like the title, for example), and the body, where the text or images that
the user is going to see are specified.
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 |
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 |