Introduction to HTML - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Introduction to HTML

Description:

Absolute http://www.abc.com/dir/doc1.htm. Relative doc1.htm. Can refer to a section on a page ... The html document and the public_html must have appropriate ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 16
Provided by: ykmal
Category:
Tags: html | abc | com | introduction | the | view

less

Transcript and Presenter's Notes

Title: Introduction to HTML


1
Introduction to HTML Library Web Page
Development
  • Web
  • HTML elements
  • Site design

2
How the Web Works Clients Servers
Client get file index.html
Server (e.g. httpd) runs on remote
machines responds to requests stores and
delivers requestedfiles
  • Client (e.g. Netscape)
  • runs locally
  • initiates requests
  • can pass files to other programs
  • customizable

Client get file index.html
3
Terminology
  • HTML Hypertext Markup Language
  • Tags surround text
  • ltBODYgtcontentlt/BODYgt
  • ltBgtboldlt/Bgt
  • Can have optional attributes
  • ltBODY BGCOLOR"white" TEXT"black" LINK"red"gt
  • URL Uniform Resource Locator web address
  • Absolute http//www.abc.com/dir/doc1.htm
  • Relative doc1.htm
  • Can refer to a section on a page

4
A Web Page
  • Browser looks at an encoded text file

Browser shows
5
General Formatting Tags
  • Header tags
  • range in size from ltH1gtBig Text in Boldlt/H1gt to
    ltH6gtLittle Text in Boldlt/H6gt
  • Paragraph ltPgtLast updated 10/27/99lt/Pgt
  • Inserts a space
  • Line break ltBRgt (no closing tag needed)
  • No space, just a line break
  • Horizontal rule ltHRgt
  • Makes a shadowed line (no closing tag needed)
  • Bold text ltBgtBold!lt/Bgt
  • Italicized text ltIgtItalicslt/Igt

6
Saving an HTML file
  • An HTML page is plain (ASCII) text, but must be
    saved with special file extensions
  • .html OR .htm
  • First file in web site should always be called
    index.html
  • The html document and the public_html must have
    appropriate modes.
  • To view a page
  • Browser menu Filegt open page
  • Keep browser open, just click its Reload button
    to see changes.

7
Lists
  • Putting things in order
  • Bulleted
  • ltULgt
  • ltLIgt item 1
  • ltLIgt item 2
  • lt/ULgt
  • Numbered
  • ltOLgt
  • ltLIgt item 1
  • ltLIgt item 2
  • lt/OLgt
  • Definition (no bullets or numbers)
  • ltDLgtltDTgtThis     ltDDgtitem 1      ltDDgtitem 2
    ltDTgtThat     ltDDgtitem1      ltDDgtitem2
  • lt/DLgt

8
Hypertext Links
  • Link to a document
  • ltA HREFhttp//www.yahoo.com/gtYahoolt/Agt
  • or
  • ltA HREFdocument.htmlgtmy documentlt/Agt
  • Create a Mailto Link
  • ltA HREFmailtostudent_at_cs.colostate.edugtA
    Studentlt/Agt
  • Always close a hypertext link!

9
Images
  • Basic image tag
  • ltIMG SRCgraphicurl.jpggt - no closing tag
    needed!
  • Optional Attributes (parts of the image tag)
  • BORDER1 places a lined border around the
    image
  • ALIGNright places the image on the page in
    relation to the text in the same
    paragraph
  • ALTphoto text description of the image
  • Images can be hypertext links.
  • ltA HREFnext.htmlgtltimg srcnext.gifgtlt/Agt

10
Formatting
  • Adding color
  • You can add color to the background and to fonts
  • See hex code sheet for colors
  • Always use the format xxxxxx for colors
  • FF0000 red
  • 00FF00 green
  • 0000FF blue
  • FFFFFF white, 000000 black, 999999 gray
  • See color tables on the web
  • Color names may be supported by newer browsers
  • Green, Brown, Black, Acqua etc.

11
Formatting
  • Fonts ltFONTgtlt/FONTgt
  • Attributes face, color and size
  • ltfont size2 faceVerdana" color"Green"gtHey
    I'm green and in Impact Font!lt/fontgt
  • Centering
  • aligncenter (always use the quotes)
  • Use for headings like ltH1 ALIGNCENTERgt or
    paragraphs like ltP ALIGNCENTERgt

12
Tables
  • Structure
  • ltTABLEgt     ltTRgt          ltTDgt Books
    lt/TDgtltTDgtBagslt/TDgt     lt/TRgt     ltTRgt         
    ltTDgt 5 lt/TDgtltTDgt 3 lt/TDgt     lt/TRgtlt/TABLEgt
  • You can align items, merge cells, control border
    etc.

13
Frames Target
  • Structure
  • ltHTMLgt  ltHEADgtltTITLEgtFrames
    Pagelt/TITLEgtlt/HEADgt ltFRAMESET COLS25,"gt
    ltFRAME NAMEside" SRCside.html"gt ltFRAME
    NAMEmain" SRC"http//abc.def.com/main
    .html"gt  lt/FRAMESETgt lt/HTMLgt
  • FRAMESET can be nested.
  • A link can open in a frame or outside ("_blank" )
  • ltA HREF"url" TARGETframe_name"gtLinklt/Agt

14
Maintaining Your Web Pages
  • Keep things current!
  • Check links regularly
  • Provide an option for feedback
  • Keep a backup of your pages in case disasters
    (natural or otherwise) occur
  • If deleted,
  • inform those who have a link
  • redirect

15
Things to avoid
  • Bad taste
  • Blinking text
  • Too many colors/too many special fonts
  • Large graphics (50k rule)
  • Large layout
  • Specialized designs
  • Always provide ALT tags for images
  • If you use image maps, provide text links
  • Slow servers check load performance
Write a Comment
User Comments (0)
About PowerShow.com