Docsity

HTML and Meta Tags: Creating Links and Refreshing Pages - Prof. Fawzi Philip Emad, Study notes of Computer Science

Partial preview of the text

Download HTML and Meta Tags: Creating Links and Refreshing Pages - Prof. Fawzi Philip Emad and more Study notes Computer Science in PDF only on Docsity!

Announcements^ ^ Paper due today

  • Suggestions for Writing HTML Code  Add the corresponding end tag immediately  Use indentation  Have a consistent style  Use comments to separate sections of yourcode.  Make sure your code satisfies HTML 4.

http-equiv attribute of meta tag ^ refresh value^ ^ Refreshes the page every 30 seconds.^ ^ With this attribute you can create a simple animation asyou can specify a different page to load^ ^ content-type value^ ^ content-type text/html is automatically added to html documents^ ^ You can define which character set to use by:^

Links ^ Link โ€“ connection between web resources ^ Hypertext links are created using the tags ^ The link can be text :^ ^

CNN Web Page

^ Notice that you need to specify the protocol (http://) ^ Example html1Link.html ^ The URL can be absolute or relative  The link can be an image: ^

**_

Absolute vs. Relative URLs ^ Relative URL^ ^ Resource location determined based on default basedirectory and provided information.^ ^ Example (html2Link.html)Previous Example ^ Changing the base^ ^ You can change the default base directory by usingthe


tag (has no end tag). This tag is part of the header section.  Example (html3Link.html)

Linking to Document Sections^ ^ Reaching a particular section helps in long documents^ ^ Naming the fragment^ ^ Use the tag along with the

name^ attribute to identify the

section.

^ Accessing the section^ ^ You can identify the section by using # and the specified name

Class Syllabus ^ Example (html4Link.html) ^ If the section is in another document then you need to specify thedocument. For example:

Class Syllabus

Imagemaps^ ^ Imagemaps โ€“ Image where image regions are associated with links^ ^ Two types^ ^ Client-side imagemaps โ€“ All the information needed is in the html sobrowser can generate the map^ ^ Server-side imagemaps โ€“ All the information needed is in the server ina .map file.^ ^ Client-side imagemaps^ ^ Makes use of tag and tag^ ^ The tag defines the shape attribute that can assume thefollowing values:^ 

rect  circle  poly  Example (html7Link.html)

Other Links^ Non-web links^ ^ mailto^ Nelson Padua-Perez^ 

mailto can be customized with subject or bodyusing

subject

,^ body

and^ &

^ Example (html8Link.html)  ftp โ€“ to download files. file