html hypertext markup language –first proposed by cern in 1989 –it is non-linear so it allows...

42
HTML Hypertext Markup Language First proposed by CERN in 1989 It is non-linear so it allows you to jump from place to place Markup refers to the structure of the language so you can identify what is going on Source code example W3C – new governing body that regulates HTML coding W3 consortium

Post on 19-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

HTML

• Hypertext Markup Language– First proposed by CERN in 1989– It is non-linear so it allows you to jump from place to

place– Markup refers to the structure of the language so you

can identify what is going on• Source code example

• W3C – new governing body that regulates HTML coding– W3 consortium

Page 2: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

HTML as a Markup Language

• A markup language is a structured language that lets you identify common sections of a document such as headings, paragraphs, and lists

• An HTML file includes text and HTML markup elements

• The browser interprets the HTML markup elements and displays the results, hiding the actual markup tags from the user

Page 3: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

XML: An Open Standard

• XML is the Extensible Markup Language• XML is a meta-language; not a language

itself, but a language that lets you describe other languages

• XML describes data, not presentation• XML allows better access to data• XML lends itself to customized information

Page 4: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

XML Syntax Rules

• Documents must be well-formed

• Elements must nest correctly

• XML is case-sensitive

• End tags are required

• Empty elements are signified by a closing slash

• Attribute values must be quoted

Page 5: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

XHTML: The Future of HTML

• XHTML is a reformulation of HTML 4.01 in XML

• Brings data-handling benefits of XML to HTML

• Style sheets are required

• Stricter syntax rules

Page 6: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

HTML Limitations

• HTML (HyperText Markup Language) is a very general language designed to place information on web pages. It is not a word processing or desktop publishing tool. The sooner you come to grips with this fact, the faster you will become an effective webdesigner. Here's why: – No two browsers show a page quite the same way. – Even if everyone were to use the same browser, not

everyone would have the same resolution as you. – It really never was intended to be as specific as a word

processor, and its fundamental structure reflects this. – Nobody owns the web. Therefore, standards are rather

difficult to enforce.

Page 7: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

File Names and URLs

• Names– Front door URL– Page names

• Case Sensitivity• Character Exceptions that you CANNOT USE

– /,/,&,*, <,>, and blank spaces

• File Extensions– .htm– .html– .asp– .xls– .gif– .jpg

Page 8: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure
Page 9: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Complete URLs and Directory Structure

• http://isec.sandiego.edu/carl/gba576.asp

• Versus gba576.asp

• Relative versus absolute paths

Page 10: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure
Page 11: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure
Page 12: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure
Page 13: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Web Page Elements

• Title• Bookmarks• Body• Background• Normal text• Paragraph• Bulleted list

• Headings• Images• Horizontal Rules• Image map• Hotspot• Animated images• Hyperlinks

Page 14: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Web Page Elementstitle

heading

body

image

paragraph

horizontal rule

links

animated image

bulleted list

Page 15: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Entering HTML Tags and Text• Four tags define the overall structure of standard

Web pages:– <HTML> and </HTML>

• Indicates file is an HTML document

– <HEAD> and </HEAD>• Introduction to the rest of the file• Indicates the area where the title will be placed

– <TITLE> and </TITLE>• Indicates the title that will display in the title bar

– <BODY> and </BODY>• Indicates the boundaries of the Web page

Page 16: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

HTML Tags and Functions

Page 17: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Entering Initial HTML Tags

initial tags

insertion point

It is good form to be consistentwhen you type tags, adhering

to a standard practice

Page 18: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Entering Initial HTML Tags

ending BODY and HTML tags

all Web page content will be placed here

If you notice an error in the text, use the BACKSPACE key to

erase all the characters back to and including the one that is

incorrect

Page 19: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Headings

• Used to separate text and introduce new topics

• Vary in size, from <H1> through <H6>

• Use the same sized heading for the same level of topic

Page 20: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Paragraphs

• Most text on Web pages is in paragraph format

• The <P> tag has an optional ending tag

• When a browser finds a <P> tag, it starts a new line and adds a paragraph break

• Try not to type large sections of text without having paragraph breaks

Page 21: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Creating a List• Lists structure your text in outline format

– Unordered (bulleted) lists• <UL> and </UL> marks the beginning and end of

unordered lists

– Ordered (numbered) lists• <OL> and </OL> marks the beginning and end of

ordered lists

• The <LI> and </LI> tags define list items

• The TYPE attribute defines the default bullet or number type

Page 22: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Unordered Lists

<H3>Unordered Lists</H3><UL TYPE=“disc”><LI>First item – type disc</LI><LI>Second item – type disc</LI></UL>

<UL TYPE=“square”><LI>First item – type square</LI><LI>Second item – type square</LI><UL>

<UL TYPE=“circle”><LI>First item – type circle</LI><LI>Second item – type circle</LI></UL>

Page 23: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Ordered Lists <H3>Ordered Lists</H3> <OL TYPE=“1”> <LI>First item – type 1</LI> <LI>Second item – type 1</LI> </OL>

<OL TYPE=“A”> <LI>First item – type A</LI> <LI>Second item – type A</LI> </OL>

<OL TYPE=“a”> <LI>First item – type a</LI> <LI>Second item – type a</LI> </OL>

<OL TYPE=“I”> <LI>First item – type I</LI> <LI>Second item – type I</LI> </OL>

<OL TYPE=“i”> <LI>First item – type i</LI> <LI>Second item – type i</LI> </OL>

Page 24: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Creating a Bulleted List

bulleted listtags and text

Page 25: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Saving the HTML File

• You must save the file before you can view it in your browser

• HTML files must end with an extension of .htm or .html

• .html extensions only work on Web servers running an operating system that supports long filenames

Page 26: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Your Browsermaximizebutton

standardbuttonstoolbar

status bar

defaultstartup page

address bar

menu bar

Internet Explorer Window

Page 27: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Your Web Pagetitle

body ofWeb page

main heading

H2 heading

bulleted list

paragraph

Page 28: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Adding Background Color

Locate the6-character codeof the color you

wish to use

Page 29: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Adding Background Color

Background color code goesat the end of the BODY tag

Page 30: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Centering the Heading

• Text can be aligned differently on the page– ALIGN = “LEFT”– ALIGN = “RIGHT”– ALIGN = “CENTER”

• The default alignment for headings is left-alignment

Page 31: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Centering the Heading

center-alignment code

Page 32: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Adding a Horizontal Rule

• Horizontal Rules are graphical images that act as dividers

• The tag used to insert a Horizontal Rule is <HR>

• Horizontal Rules are easy to insert

Page 33: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Adding a Horizontal Rule

• Horizontal Rules are graphical images that act as dividers

• The tag used to insert a Horizontal Rule is <HR>

• Horizontal Rules are easy to insert

Page 34: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Adding a Horizontal Rule<HTML><HEAD><TITLE>Horizontal Rules</TITLE></HEAD><BODY BGCOLOR=#94D6E7>

<P>Default HR</P><HR>

<P>HR with size=1</P><HR SIZE=1>

<P>HR with size=5</P><HR SIZE=5>

<P>HR with size=10</P><HR SIZE=10>

<P>HR with size=10 and noshade</P><HR SIZE=10 NOSHADE>

</BODY></HTML>

Page 35: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Adding a Horizontal Rule

horizontalrule tag

Page 36: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Viewing the Modified File in Your Browser

after saving the modified file,click the Refresh button in

your browser

Page 37: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Viewing Your Web Page Source

• You can view the HTML code on any Web page from within your browser

• This allows you to see how others created their Web pages

Page 38: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Definition Lists

• Used to list information without the standard bullet or numbered list symbols

• Syntax is not as straightforward as <UL>, <OL>, or <LI>

• <DL> and </DL> start and end the list

• <DT> and <DD> are used to create the actual list elements, terms, and definitions

Page 39: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Definition Lists

Page 40: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

definition list start

definition list end

definitionterm start

definitionstart

Page 41: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

definition termsdefinitions

Page 42: HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure

Summary

• Identify elements of a Web Page

• Enter the <HTML>, <HEAD>, <TITLE>, and <BODY> tags

• Enter a paragraph of text, a bulleted list, and HTML tags

• Save an HTML file