Upload
annabella-mosley
View
223
Download
2
Tags:
Embed Size (px)
Citation preview
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 1
Advanced HTMLAdvanced HTML
IntroductionIntroduction
• Frames• HTML Forms• CGI Scripts• Dynamic Documents• HTML Tools• Next-Generation HTML
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 2
Advanced HTMLAdvanced HTML
• Frame Usage • Frame Tags• Frequently Asked Questions• Additional Frame Tag Attributes• Targeted Hyperlinks• Frameset Design Algorithm
FramesFrames
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 3
Advanced HTMLAdvanced HTML
• Common content• Form verification• Table of contents• Search engines
FramesFrame UsageFrame Usage
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 4
Advanced HTMLAdvanced HTML
• Use <FRAMESET></FRAMESET> instead of <BODY></BODY>
• <FRAME>• Attributes
• COLS• ROWS• NAME• SRC
• <NOFRAMES></NOFRAMES>
FramesFrame TagsFrame Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 5
Advanced HTMLAdvanced HTML
• Can COLS and ROWS be used in conjunction with one another? If so, what is the result?
• How are the source files loaded into the frames?• If each document in a frameset has a title, which title is
displayed in the lone title bar when the group of frames is being displayed?
• How can the HTML source code be viewed for a document created using the frameset tag?
• How can the source code of individual frames be viewed?
FramesFrequently Asked QuestionsFrequently Asked Questions
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 6
Advanced HTMLAdvanced HTML
• Is it possible to load a document that is itself a document consisting of a frameset declaration into the SRC attribute of a frame tag?
• Can a hyperlink be targeted into a specific frame? • Can a new browser be launched automatically, if you
do not wish to load a large page into a small frame?• Can frames be nested?• Is there an easy way to produce any frame layout?
FramesFrequently Asked QuestionsFrequently Asked Questions
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 7
Advanced HTMLAdvanced HTML
• NORESIZE• SCROLLING: yes, no, auto• MARGINHEIGHT• MARGINWIDTH• FRAMEBORDER: no, yes, 0, 1
FramesAdditional Frame Tag AttributesAdditional Frame Tag Attributes
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 8
Advanced HTMLAdvanced HTML
• TARGET attribute• Of <A> tag• Of <BASE> tag
• “Special targets”• _blank• _top
FramesTargeted HyperlinksTargeted Hyperlinks
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 9
Advanced HTMLAdvanced HTML
<HTML>
<HEAD><TITLE>Nesting Frames</TITLE></HEAD>
<FRAMESET ROWS = “50%,50%”>
<FRAMESET COLS = “33%,67%”><FRAME SRC = “left-third.html”
NAME = “left-third”><FRAME SRC = “right-twothirds.html”
NAME = “right-twothirds”>
</FRAMESET>
<FRAME SRC = “bottom-row.html” NAME = “bottom-row”></FRAMESET>
</HTML>
Nested Nested FramesFrames
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 10
Advanced HTMLAdvanced HTML
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 11
Advanced HTMLAdvanced HTML
• Storyboard• Framing algorithm:
• Choose COLS or ROWS for outermost frameset• Repeat for each inner frameset until no subdivisions
• Recursive
FramesFrameset Design AlgorithmFrameset Design Algorithm
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 12
Advanced HTMLAdvanced HTML
• Form Tags• Form Methods• Mailto URLs• Form Input Tags• Frequently Asked Questions
HTML FormsHTML Forms
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 13
Advanced HTMLAdvanced HTML
• <FORM></FORM>• ACTION• METHOD• Cgibin (Common Gateway Interface) directory
HTML FormsForm TagsForm Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 14
Advanced HTMLAdvanced HTML
Basic structure:
<FORMACTION =
“http://www.server.com/cgibin/program”METHOD = “get”
…</FORM>
HTML FormsForm TagsForm Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 15
Advanced HTMLAdvanced HTML
• Introduction• get• post
• Comparison: get and post• Considerations:
• Programmer’s expertise• Number of input parameters• Security
HTML FormsMethodsMethods
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 16
Advanced HTMLAdvanced HTML
• As ACTION attribute• Other uses of mailto ACTION• Testing forms• Learn about parameter encodings• To make use of forms• Guest book
HTML FormsMailto URLsMailto URLs
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 17
Advanced HTMLAdvanced HTML
• <INPUT>• Text Boxes
• Rectangular-shaped• User enters text• TYPE = “text”• NAME• SIZE: number of characters• MAXLENGTH• VALUE
HTML FormsForm Input TagsForm Input Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 18
Advanced HTMLAdvanced HTML
• Checkboxes• TYPE = “checkbox”• NAME• VALUE• Icon user selects/deselects• CHECKED
• Radio Buttons• Only one can be selected• TYPE = “radio”• VALUE = “Yes” or “No”• Buttons with same NAME
HTML FormsForm Input TagsForm Input Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 19
Advanced HTMLAdvanced HTML
Action Buttons• TYPE
• Submit• Reset
• VALUE• “SUBMIT” or “SEND”• “RESET” or “CLEAR”
HTML FormsForm Input TagsForm Input Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 20
Advanced HTMLAdvanced HTML
Selects• <SELECT></SELECT>• MULTIPLE: number of options can be selected• NAME• SIZE: number of options displayed• <OPTION>
• SELECTED• VALUE
HTML FormsForm Input TagsForm Input Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 21
Advanced HTMLAdvanced HTML
Text Areas• Multirow text field• <TEXTAREA></TEXTAREA>• ROWS• COLS• MAXLENGTH• WRAP
HTML FormsForm Input TagsForm Input Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 22
Advanced HTMLAdvanced HTML
Password<INPUT TYPE = “password”
NAME = “nn”SIZE = “40”MAXLENGTH = “20”>
- Masked field
HTML FormsForm Input TagsForm Input Tags
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 23
Advanced HTMLAdvanced HTML
Form Layout Using Preformatted TagForm Layout Using Preformatted Tag
• <Pre></Pre>: items within the tags are coded as their ASCII text format.
• Specific symbols in HTML file:&: &
<: < ©: ©
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 24
Advanced HTMLAdvanced HTML
• Can a user load a new Web page or an image by pressing a “submit” button on a form?
• There is a button that looks like a submit button, but it says something else. Is this accomplished with forms? How?
• Is there a way to use a form to create a navigational button such that when a user submits the form, I can have another page loaded into a specific frame?
• Can you name a form?
HTML FormsFrequently Asked QuestionsFrequently Asked Questions
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 25
Advanced HTMLAdvanced HTML
• Scripts and Forms• Security
CGI ScriptsCGI Scripts
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 26
Advanced HTMLAdvanced HTML
• After user submits form• Server receives request • Server runs script• Inputs to script are values from form
CGI ScriptsScripts and FormsScripts and Forms
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 27
Advanced HTMLAdvanced HTML
• Client Pull• Server Push• New-Address Notification
Dynamic DocumentsDynamic Documents
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 28
Advanced HTMLAdvanced HTML
Browser (client) initiates document’s change• Demand on Internet• HTTP-EQUIV• CONTENT• <META HTTP-EQUIV = “refresh” CONTENT = “n”>• Reloading different document• Example:
<META HTTP-EQUIV = “refresh”CONTENT =
“10;URL=http://www.mycomputer.edu/~you/data.html”>
Dynamic DocumentsClient PullClient Pull
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 29
Advanced HTMLAdvanced HTML
• Server initiates the document’s change• Demand on server• Java or Perl
Dynamic DocumentsServer PushServer Push
Important use of client pull
New-Address NotificationNew-Address Notification
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 30
Advanced HTMLAdvanced HTML
• Editors• Syntax Checkers• Converters
HTML ToolsHTML Tools
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 31
Advanced HTMLAdvanced HTML
• Software tool• Two types:
• WYSIWYG (“what you see is what you get”)• Tag-oriented
HTML ToolsEditorsEditors
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 32
Advanced HTMLAdvanced HTML
Editor Components• Color selector• Documentation• HTML converter• Hyperlink inserter• Spell checker• Tag generator• Template creator• Tutorial• Viewer
HTML ToolsEditorsEditors
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 33
Advanced HTMLAdvanced HTML
Editor Usage• Generate draft• Develop pages expected to be around for while• Develop consistent set of pages
HTML ToolsEditorsEditors
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 34
Advanced HTMLAdvanced HTML
Editor Drawbacks• Featuritis• Incomplete support• Poor error reporting• Programming style• User interface
HTML ToolsEditorsEditors
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 35
Advanced HTMLAdvanced HTML
Editor Availability• Frontpage, Microsoft• HotDog Pro, Sausage Software• HoTMetal, SoftQuad• Navigator Gold, Netscape• SiteMill, Adobe• Dreamweaver, Macromedia
HTML ToolsEditorsEditors
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 36
Advanced HTMLAdvanced HTML
• Code Analysis• Error report• Feature subsetting• Image analysis• Link verification• Structure report• Making suggestions• Load timing
HTML ToolsSyntax CheckersSyntax Checkers
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 37
Advanced HTMLAdvanced HTML
• Syntax Checker Availability• Doctor HTML• Dr. Watson• Weblint
HTML ToolsSyntax CheckersSyntax Checkers
• Converts a document into HTML format• On-line resume
ConvertersConverters
From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 38
Advanced HTMLAdvanced HTML
• Extensible markup language (XML)•Support user-defined tags
• Cascading style sheets (CSS)•In-line styles: change the look of individual tag
•<H5 Style = “background:gray; text-transform:uppercase”>Heading 5</H5>•<Body Style = “background-image:URL(image.jpg); background-repeat:no-repeat; background-attachment:fixed;background-position:center”>
•Internal styles: a set of styles declared in the <Style></Style> tags, which are in the head portion of a HTML file.•External Styles: a single file with the extension .css, which is applied for all pages in a site to preserve a consistent style. To include a style file in current HTML file:
<Link Rel = “stylesheet” Type = “text/css” Href = “headstyles.css”>
Next-Generation HTMLNext-Generation HTML