30
HTML H yper T ext M arkup L anguage

HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Embed Size (px)

Citation preview

Page 1: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HTMLHTMLHyper

Text

Markup

Language

Page 2: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HTMLHTML•HTML is NOT case sensitive

•However, proper coding etiquette if for all <TAGS> to be in ALL CAPS and for text to be in regular sentence form.

Page 3: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Basic HTML TagsBasic HTML TagsEach HTML tag has three basic parts:

1. An open angle bracket (less than sign): <

2. The text and characters that tell Web browsers what to do

3. A closing angle bracket (greater than sign): >

<HTML>

Page 4: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HTML TagsHTML Tags

Many tags are used in pairs (some stand alone)Start tags tell the browser where to turn on particular formatting function (like italics)

<TAG>End tags tell the browser where to turn off the function. They include a slash.

</TAG> (Container Tag)Empty tag - <LI> - Stands Alone

Page 5: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

LIFOLIFO

*Important note about paired tags:

Tags have to be LIFO: Last In First Out

It means that the LAST tag you turn on should always be the FIRST you turn off.

<HTML>

<BODY></BODY></HTML>

Page 6: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Three Sections of an HTML DocumentThree Sections of an HTML Document

1. The HTML document

2. The HEAD section

3. The BODY section

Page 7: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HTML SectionHTML Section

<HTML></HTML> The first tag in every HTML document will

always be <HTML>, which tells the Web browsers that everything that follows should be treated as a Web page.

The </HTML> tag tells the browser where the page ends.

Page 8: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HEAD SectionHEAD Section

<HEAD></HEAD> Immediately follows the opening <HTML> tag. Purpose of this section is to provide general information

about a particular Web page. This tag contains the Web page’s title

(<TITLE></TITLE> tags) This section is NOT displayed in the page’s body. Page’s title will appear at the top of the browser window,

in the title bar

Page 9: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

BODY SectionBODY Section

<BODY> </BODY>

Follows the HEAD section Contains all of your Web pages content (text,

graphics, etc.)

Page 10: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Saving Web PagesSaving Web Pages

Save every page as a .html or .htm Save main page (home page) as index.htm

This is the filename that servers first try to download. If you save your main page as index.htm, you help ensure that it is the first page that your audience will see.

Page 11: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

EXAMPLEEXAMPLE

<HTML> <HEAD><TITLE>I’m at the top of the screen in

the blue area</TITLE> </HEAD> <BODY><H1>Basic Example</H1><H2>This is

basic coding! </H2> </BODY> </HTML>

Page 12: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

<HTML>

<HEAD><TITLE>I’m at the top of the screen in the blue area</TITLE> </HEAD>

<BODY> H1>Basic Example</H1>< <H2>This is basic coding! </H2> </BODY>

</HTML>

Page 13: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

More HTMLMore HTML By default, browsers read the text of your

Web page as a continuous line of single-spaced text.

Page 14: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Adding White SpaceAdding White Space White space refers to the amount of empty

space on a page. The more white space on a page, the easier it is

to read. Force browsers to break up text by using :

Paragraph tagsLine breaksHorizontal lines

Page 15: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Paragraph Tags <P>Paragraph Tags <P> Add white space between paragraphs <P> adds one line of white space For example: Four score and seven years ago <P> our fathers brought forth <P> on this continent

a new nation, <P> conceived in Liberty, and dedicated to the proposition <P> that all men are created equal.

Would be displayed in a browser as: Four score and seven years ago

our fathers brought forth

on this continent a new nation,

conceived in Liberty, and dedicated to the proposition

that all men are created equal.

Page 16: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Line Breaks<BR>Line Breaks<BR>

Has no ending tag. Used to add a line break without adding any

new space between lines of text.<P> inserts a blank line<BR> no blank line

Page 17: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Example Using <BR>Example Using <BR> Four score and seven years ago <BR> our fathers brought

forth <BR> on this continent a new nation, <BR> conceived in Liberty, and dedicated to the proposition <BR> that all men are created equal.

Would be displayed in a browser as: Four score and seven years ago

our fathers brought forth on this continent a new nation,conceived in Liberty, and dedicated to the proposition that all men are created equal.

Page 18: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

<P> the difference <BR><P> the difference <BR> <P> Example Four score and seven years ago <P> our fathers

brought forth <P> on this continent a new nation, <P> conceived in Liberty, and dedicated to the proposition <P> that all men are created equal.

Would be displayed in a browser as: Four score and seven years ago

our fathers brought forth

on this continent a new nation,

conceived in Liberty, and dedicated to the proposition

that all men are created equal.

<BR> Example Four score and seven years ago

<BR> our fathers brought forth <BR> on this continent a new nation, <BR> conceived in Liberty, and dedicated to the proposition <BR> that all men are created equal.

Would be displayed in a browser as: Four score and seven years ago

our fathers brought forth on this continent a new nation,conceived in Liberty, and dedicated to the proposition that all men are created equal.

Page 19: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Horizontal Rules<HR>Horizontal Rules<HR>

Can visually break a page into sections. Use sparingly.

______________________________________

Page 20: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HTML – Style TagsHTML – Style Tags <B></B> specifies that the enclosed text should

be displayed in boldface. <I></I> specifies that the enclosed text should be di

splayed in italics. <U></U> specifies that the enclosed text should be

underlined. These style tags can be combined:

<B> <I>TAG</I> </B> = TAG

Page 21: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Heading Tags<H></H>Heading Tags<H></H>

Emphasizes major topics Adds hierarchy to topics Ability to create up to six levels of headings,

from

high - <H1>TAG</H1> = TAGto

low - <H6>TAG</H6> = TAG

Page 22: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HTML – Aligning TagsHTML – Aligning Tags Web browsers automatically left justify text. Tag for horizontally centering your text:

<P ALIGN=“CENTER”>Text</P><CENTER>text</CENTER>

Tag to right justify text: <P ALIGN=“RIGHT”>Text</P>

Page 23: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

ListsLists Unordered Lists – bulleted lists

Lists that do not require any specific order<UL></UL>

Each item in the list has to be identified with a list item tag:<LI></LI>

Example:<P>Spring Classes are as follows:</P><UL><LI>Keyboarding</LI><LI>E-Commerce/Web Design</LI><LI>Information Management</LI></UL>

Page 24: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Ordered ListsOrdered Lists Ordered Lists – numbered lists

Lists that do require a specific order.<OL></OL>

Numbers are automatically inserted.Each item in the list has to be identified with a list item tag:

<LI></LI>Example:

<P>Spring Classes are as follows:</P><OL><LI>Keyboarding</LI><LI>E-Commerce/Web Design</LI><LI>Information Management</LI></OL>

Page 25: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

BGCOLOR=###### Add to the <BODY> tag

<BODY BGCOLOR=0000FF> Color is changed by changing the hex code

(0000FF) <BODY BGCOLOR=RED>

Background Color TagBackground Color Tag

Page 26: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Font Color TagFont Color Tag FONT SIZE

<FONT SIZE=“3”></FONT>Size Range: 1-7Default is 3

<FONT COLOR=FFFFFF></FONT> RGB OR HEX NUMBERS FOR COLORS Use the same hex numbers for color

(FFFFFF is white) Or <FONT COLOR=“red”></FONT> <FONT FACE=“ARIAL”> </FONT>

Page 27: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

HyperlinkHyperlink

<A HREF=http://www.yahoo.com>visit Yahoo!</A>

visit Yahoo

Page 28: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Hyperlink ColorHyperlink Color Included in the <BODY> Tag LINK Color – the color of the hyperlink of your web page.

LINK=RED VLINK Color (Visited hyperlink)- the color of the hyperlink

once the Web site has been visitedVLINK=BLUE

ALINK Color (Active hyperlink)- the color of the hyperlink once the Web site has been visited

EXAMPLE:

<BODY BGCOLOR = FFFFFF LINK=RED VLINK=BLUE>

Page 29: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

IMAGE TAGIMAGE TAG

<IMG SRC=“image.gif”> <BODY BACKGROUND=“IMAGE.GIF”> Gif images (Graphic Interchange Format)

Clip ArtRegular Graphics

Jpeg images (Joint Photographic Experts Group)Photos

Page 30: HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be

Image as a HyperlinkImage as a Hyperlink

<A HREF=“URL”><IMG SRC=“IMAGE.GIF> </A>

Example:<A HREF=HTTP://WWW.EXCITE.COM><IMG SRC=“charlie.jpg”></A>SIZE– <IMG SRC=“IMAGE.GIF HEIGHT=“30” WIDTH=“475”>– Measures in pixels