Beruflich Dokumente
Kultur Dokumente
What is HTML?
Hypertext Markup Language, or HTML for short, is what tells a web browser how a page should look. An HTML document contains two
components: content (e.g., course schedule information) and HTML commands that specify the placement and formatting of the content
(e.g., bold, italics, grid layout).
HTML Elements
1. HTML tags are surrounded with angle brackets < >.
2. HTML tags are not technically case sensitive, but for good practice (xHTML compliance), always use lowercase.
3. HTML tags are often in pairs with a starting tag and ending tag (<body></body>).
4. HTML tags must have a closing tag. For paired tags, this means the second tag: </p>, for others, the closing slash is in the tag
itself: <br /> (xHTML compliance)
5. Nested HTML tags should close in the reverse order of the opening tags:
<body>
<strong>Curriculum Vitae</strong>
</body>
6. Some tags can have properties (or "attributes") which further refine the effects of the tag:
<p class="pink">
<img alt="logo">
In the Beginning
Start with the following tags to begin your page. All HTML pages will have these tags. The <html> tag tells the browser to
<html> read and render the page in HTML. The ending </html> tag tells the
<head>
<title> Your title goes here </title>
browser that this is the end of the page. The <title> tag denotes the title
</head> displayed on the top left of the browser. It must be placed inside
<body> the <head> tag, which is closed </head> before the body of the page begins.
Your content goes here. All of the content of the page, the text, images, media, etc., is enclosed
</body> between <body> and</body>.
</html>
Basic Tags
<HR> Horizontal rule. This command gives you a line across the page.
Break. This Breaks the text and starts it again on the next line. In an HTML document, you need to denote where you
<BR>
want every carriage return by using the <BR> tag.
<P> Paragraph. This skips a line before starting the text again.
<UL> </UL> Unordered list (bulleted)
<OL> </OL> Ordered list (numbered)
<LI> List Items (each new line)
Example:
<UL>
<LI> Applies
Apples
<LI> Oranges Oranges
<LI> Pears Pears
</UL>
<HR>
<BR>
<BR> 1. Monday
<OL>
2. Tuesday
<LI> Monday
<LI> Tuesday
3. Wednesday
<LI> Wednesday
</OL>
Text Manipulation
Text located between these tags will be formatted to your tags: bold, italics or underlined.
<B> </B> Bold. Example: <B> I want to be bold.</B>
<I> </I> Italics. Example: <I> I prefer italics. </I>
<U> </U> Underline. Example: <U> No. Underlining is the way to go. </I>
<TT></TT> Typewriter Text. Example: <TT> Display text as if it came from a typewriter. </TT>
<B> <U> This text will be bolded and underlined. </U> </B>
To right align text and have as a separate paragraph, use the following command:
Font Flags
<FONT SIZE> </FONT SIZE> There are 12 font size commands: +6 to +1 (larger) and –1 to –6 (smaller)
<FONT FACE> </FONT FACE> This changes the font type of the text contained between them.
While styles are a nice way to define the appearance of various text elements of your document, the <FONT SIZE> and <FONT FACE>
flags are the most practical way to improve your page’s appearance.
<FONT SIZE = “+3”> Increase the font size of all this text 3 times. </FONT SIZE>
<FONT FACE= “Arial”> All this text will be in Comic Sans MS </FONT FACE>
OR
<FONT SIZE=”+3” FACE=”Arial” COLOR=”Blue”> Text will be increased in size, arial font and blue </FONT>
Adding Colours
To change the colour of your text, you need two items:
1. A command to change the text
2. The hex code that represents the colour (or simply the name of common colours)
Use a search engine to find websites to see the numerous colour codes available.
These commands come right after the <TITLE> command. In that position, they affect everything on the page. You can also place
them all together inside the same command along with any background commands, something like this:
Insert an Image
<IMG SRC=”…”> This will insert an image (a file name or an online image)
This tag stands for Image Source and the file name is exactly as it is in your account with the file extension. Be sure to save all files
associated to your site in the same folder as your HTML files. This is mostly for in class assessment purposes. Your “C drive” will be
different from the teacher’s “C drive”.
<IMG SRC=”hello.jpg”>
<IMG SRC=”http://cdn1-www.dogtime.com/assets/uploads/gallery/30-impossibly-cute-puppies/impossibly-cute-puppy-2.jpg”>
Re-sizing Images
Sometimes the picture you find is too large for your page. Change the size by thinking about how many pixels high or wide you want.
Play around with the numbers until you are satisfied with the size. Keep in mind the height vs width ratios for a square versus a
rectangle.
To create an INTERNAL link for something like “Go to my page about my friends” you will need to type the following:
To create an EXTERNAL link such as “Click here for HTML goodies”, you would need to type the following:
You can also use an image to be the “clickable” link, just replace the file name with the URL.
You can use a table for a variety of purposes. You can align information into a table with columns and rows, or use them to organize the
information on the page in a specific placement (with invisible borders). If you change the border to equal zero, the border will be clear
but the information will be still be placed in the cells.
<TABLE BORDER=”1”>
<TR>
<TD> Row 1, cell 1 </TD>
<TD> Row 2, cell 2 </TD> Row 1, cell 1 Row 1, cell 2
</TR> Row 2, cell 1 Row 2, cell 2
<TR>
<TD> Row 2, cell 1 </TD>
<TD> Row 2, cell 2 </TD>
</TR>
</TABLE>
To add borders and tables within tables, please refer to the following site: http://www.htmlgoodies.com/tutors/table.html#simple
<A HREF =”#Top”> Click here to go back to the top of the page </A>
Animated Icons
Please refer to the following site for some examples: http://www.gifanimations.com/