Web Fundamentals And Html Chapter 1


Published on

Published in: Education, Technology, Sports
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Web Fundamentals And Html Chapter 1

  2. 2. INTRODUCING THE WORLD WIDE WEB <ul><li>Internet – is a structure made up of million of interconnected computers whose users can communicate with each other and share information. </li></ul><ul><li>Network – computers that are linked together </li></ul>
  3. 3. WORLD WIDE WEB <ul><li>- also known as the WWW or the Web </li></ul><ul><li>- is an organization of files designed around a group of servers on the Internet programmed to handle requests from browser software on users’ PC’s. </li></ul><ul><li>- is the fastest growing , most commercially popular technology to date. </li></ul><ul><li>TIM BERNERS-LEE – a programmer who wrote a program called a hypertext editor. </li></ul><ul><li>Hypertext document – an electronic file that contains elements that you can select, usually by clicking a mouse, to open another document . </li></ul>
  4. 4. <ul><li>Web sites – a representation of a company’s product or services available for display via the Web. </li></ul><ul><li>Webmaster – a person who is skilled in Web design, Web maintenance and Web upgrade. </li></ul><ul><li>Browser – a program designed to search for and bring in Internet resources. </li></ul><ul><li>Plug-in – specialized program designed to enhance a function. </li></ul>
  5. 5. <ul><li>Web server – is the computer that stores the web document that users access. </li></ul><ul><li>Web browser – is the software program that accesses the web document and displays it contents on the user’s computer </li></ul><ul><li>Hypertext Markup Language – the language of the Web </li></ul><ul><li>Standard Generalized Markup Language – SGML is one example of a more general mark up language </li></ul>
  6. 6. <ul><li>Versions of HTML </li></ul><ul><li>HTML 0.0 – the original version developed by Tim Berners Lee and other researcher at CERN. It has long been supplanted by the succeeding versions of HTML </li></ul><ul><li>HTML 1.0 – the first public version of HTML, which included support for inline images and text controls. Some browsers, most notably the text-based Lynx browser used on the UNIX system, operates at the 1.0 level </li></ul>
  7. 7. <ul><li>HTML 2.0 - the version supported by all graphical browsers including Netscape Navigator, Mosaic and Internet Explorer. It supported interactive form elements such as option buttons and text boxes. A document written to follow 2.0 specification would be readable by most browser on the Internet. </li></ul><ul><li>HTML 3.2 – this version is also referred to as HTML+. It includes more support for creating and formatting tables and expands the option for creating interactive elements. It also allows for the creation of complex mathematical equations. </li></ul>
  8. 8. HTML SYNTAX <ul><li>Syntax – a grammar or set of rules under which HTML operates </li></ul><ul><li>Two Elements of HTML document </li></ul><ul><li>Document contents – part of the document that you want the user to see, such as text and graphics </li></ul><ul><li>Tags – are HTML codes that indicate the document content </li></ul>
  9. 9. <ul><li>< > - identification of tag name </li></ul><ul><li>Classification of Tag </li></ul><ul><li>Two sided tags </li></ul><ul><li>Opening tag – the first tag, which tells the browser to turn on the feature and apply it to document content that follows. </li></ul><ul><li>Closing tag – which turns off the feature </li></ul><ul><li></> - symbol to close the tag </li></ul><ul><li>One sided tag – also known as single tag </li></ul><ul><li>Properties – additional information placed within the bracket that defines the tag’s appearance. </li></ul>
  11. 11. CREATING A WEB PAGE <ul><li>Starting a Word Processor </li></ul><ul><li>1. Before you can begin, you’ll need to choose a program to use to create your HTML documents. </li></ul><ul><li>2. Any word processor will work </li></ul><ul><li>3. WordPad is a good starting point if you’re not sure which program to use </li></ul><ul><li>4. Your Task: Start WordPad </li></ul>
  12. 12. <ul><li>The Empty Word Processing Document </li></ul>
  13. 13. All HTML Documents Have the Same Structure <HTML> T The first 6 tags are always the same in basic HTML document. Also known as HTML Headings . <TITLE> Online Resume </TITLE> </HEAD> D> <HEAD> </HTML> </HTML> IINTRODUCTION TO HTML <TITLE>
  14. 14. Parts of Web Page <ul><li>HTML - tags indicate codes is written in HTML </li></ul><ul><li><HTML> </HTML> </li></ul><ul><li>2. Head – surround information about web page </li></ul><ul><ul><ul><li>- Info about the document </li></ul></ul></ul><ul><ul><ul><li>Info in header not generally rendered in display window </li></ul></ul></ul><ul><ul><ul><li><Head> </Head> </li></ul></ul></ul><ul><li>3. Title – tags identify title. It usually appears on the title bar </li></ul><ul><ul><ul><li>- name of your Web page </li></ul></ul></ul><ul><ul><ul><li><Title> </Title> </li></ul></ul></ul>
  15. 15. <ul><li>4. Body – tags surround the portion of the </li></ul><ul><li>document that appears in the browser </li></ul><ul><ul><ul><li>- Page content </li></ul></ul></ul><ul><ul><ul><li>- Includes text, images, links, forms, etc. </li></ul></ul></ul><ul><ul><ul><li>- Elements include backgrounds, link colors and font faces </li></ul></ul></ul><ul><ul><ul><li><Body> </Body> </li></ul></ul></ul>
  16. 16. Common Body Tags/Syntax in Creating a Web Page
  17. 17. Creating Heading Tags HTML has 6 levels of heading which arrange from biggest to smallest size <H1> My Resume </H1> <H2> My Resume </H2> <H3> My Resume </H3> <H4> My Resume </H4> <H5> My Resume </H5> <H6> My Resume </H6>
  18. 18. CREATING HEADING TAGS Headings <H1...H6> <HTML> <HEAD> <TITLE>Online Resume</TITLE> </HEAD> <BODY> <H1>My Resume</H1> <H2>My Resume</H2> <H3>My Resume</H3> <H4>My Resume</H4> <H5>My Resume</H5> <H6>My Resume</H6> </BODY> </HTML>
  19. 19. <ul><li>Entering Paragraph Text </li></ul><ul><ul><ul><li><p> - P element forms a paragraph, blank line before and after </li></ul></ul></ul><ul><li>- adds an extra line before text to separate it from any text that proceeds it. </li></ul><ul><li></p> to close the paragraph tag </li></ul>
  20. 20. HTML Line Breaks Use the <br /> tag if you want a line break (a new line) without starting a new paragraph: The <br /> element is an empty HTML element. It has no end tag. <br> or <br />
  21. 21. Saving a new HTML Document 1. Pull down the File menu and select s ave As 2. You will now see the Save As dialog box 3. Once you’ve determined the location for the file, you will need to give the file name. There are some rules to follow when naming HTML files: No spaces, and special characters a (é,%,#....) No very long name Generally, keep the file names all lower case. All file names must end with the extension of .htm or html
  22. 22. After Saving the Document, you should see the name of the document at the top of your WordPad window In this case, the file is called index. You will not see the extension of .html and that is to be expected.
  23. 23. Previewing a Local HTML Document Go to the local folder and double clic on the index.htm file This will open the index.htm in your default internet bowser ( Netscape or MS internet explorer )
  25. 25. Background Colors <HTML> <HEAD> <TITLE>Backgrounds</TITLE> </HEAD> <BODY BGCOLOR=&quot;#0000FF&quot;> This page has a blue background. <P> </BODY> </HTML>
  27. 27. 000000 000000 000000 000000 000000 000000 000000 111111 110000 111100 001100 001111 000011 110011 222222 220000 222200 002200 002222 000022 220022 333333 330000 333300 003300 003333 000033 330033 444444 440000 444400 004400 004444 000044 440044 555555 550000 555500 005500 005555 000055 550055 666666 660000 666600 006600 006666 000066 660066 777777 770000 777700 007700 007777 000077 770077 888888 880000 888800 008800 008888 000088 880088 999999 990000 999900 009900 009999 000099 990099 AAAAAA AA0000 AAAA00 00AA00 00AAAA 0000AA AA00AA BBBBBB BB0000 BBBB00 00BB00 00BBBB 0000BB BB00BB CCCCCC CC0000 CCCC00 00CC00 00CCCC 0000CC CC00CC DDDDDD DD0000 DDDD00 00DD00 00DDDD 0000DD DD00DD EEEEEE EE0000 EEEE00 00EE00 00EEEE 0000EE EE00EE FFFFFF FF0000 FFFF00 00FF00 00FFFF 0000FF FF00FF
  28. 28. 00FF80 80FF00 8000FF 0080FF FF8000 FF0080 11FF80 80FF11 8011FF 1180FF FF8011 FF1180 22FF80 80FF22 8022FF 2280FF FF8022 FF2280 33FF80 80FF33 8033FF 3380FF FF8033 FF3380 44FF80 80FF44 8044FF 4480FF FF8044 FF4480 55FF80 80FF55 8055FF 5580FF FF8055 FF5580 66FF80 80FF66 8066FF 6680FF FF8066 FF6680 77FF80 80FF77 8077FF 7780FF FF8077 FF7780 88FF80 80FF88 8088FF 8880FF FF8088 FF8880 99FF80 80FF99 8099FF 9980FF FF8099 FF9980 AAFF80 80FFAA 80AAFF AA80FF FF80AA FFAA80 BBFF80 80FFBB 80BBFF BB80FF FF80BB FFBB80 CCFF80 80FFCC 80CCFF CC80FF FF80CC FFCC80 DDFF80 80FFDD 80DDFF DD80FF FF80DD FFDD80 EEFF80 80FFEE 80EEFF EE80FF FF80EE FFEE80 FFFF80 80FFFF 80FFFF FF80FF FF80FF FFFF80
  29. 29. 800080 808000 008080 400040 404000 004040 801180 808011 118080 401140 404011 114040 802280 808022 228080 402240 404022 224040 803380 808033 338080 403340 404033 334040 804480 808044 448080 404440 404044 444040 805580 808055 558080 405540 404055 554040 806680 808066 668080 406640 404066 664040 807780 808077 778080 407740 404077 774040 808880 808088 888080 408840 404088 884040 809980 808099 998080 409940 404099 994040 80AA80 8080AA AA8080 40AA40 4040AA AA4040 80BB80 8080BB BB8080 40BB40 4040BB BB4040 80CC80 8080CC CC8080 40CC40 4040CC CC4040 80DD80 8080DD DD8080 40DD40 4040DD DD4040 80EE80 8080EE EE8080 40EE40 4040EE EE4040 80FF80 8080FF FF8080 40FF40 4040FF FF4040
  30. 30. 66FF00 66FF33 66FF66 66FF99 66FFDD 66FFFF 990000 990033 990066 990099 9900DD 9900FF 993300 993333 993366 993399 9933DD 9933FF 996600 996633 996666 996699 9966DD 9966FF 999900 999933 999966 999999 9999DD 9999FF 99DD00 99DD33 99DD66 99DD99 99DDDD 99DDFF 99FF00 99FF33 99FF66 99FF99 99FFDD 99FFFF DD0000 DD0033 DD0066 DD0099 DD00DD DD00FF DD3300 DD3333 DD3366 DD3399 DD33DD DD33FF DD6600 DD6633 DD6666 DD6699 DD66DD DD66FF DD9900 DD9933 DD9966 DD9999 DD99DD DD99FF DDDD00 DDDD33 DDDD66 DDDD99 DDDDDD DDDDFF DDFF00 DDFF33 DDFF66 DDFF99 DDFFDD DDFFFF FF0000 FF0033 FF0066 FF0099 FF00DD FF00FF FF3300 FF3333 FF3366 FF3399 FF33DD FF33FF FF6600 FF6633 FF6666 FF6699 FF66DD FF66FF FF9900 FF9933 FF9966 FF9999 FF99DD FF99FF FFDD00 FFDD33 FFDD66 FFDD99 FFDDDD FFDDFF FFFF00 FFFF33 FFFF66 FFFF99 FFFFDD FFFFFF
  31. 31. Character Formatting <CENTER>Centering</CENTER> <HTML> <HEAD> <TITLE>The Moroccan NODC, Rabat</TITLE> </HEAD> <BODY> <CENTER> <H1>Welcome to The Moroccan National Oceanographic Data Center – Odinafrica - Rabat </H1> </CENTER> </BODY> </HTML> INTRODUCTION TO HTML
  32. 32. Character Formatting <B> Bold </B> & <I> Italics </I> <BR> - The Break Tag <HTML> <HEAD> <TITLE>The Moroccan NODC, Rabat</TITLE> </HEAD> <BODY> <CENTER> <H1>Welcome to The Moroccan National Oceanographic Data Center – Odinafrica - Rabat </H1> </CENTER> </BODY> </HTML> <H3>Contact Information</H3> <B>CNDIO Maroc</B><BR> PO Box 1014-Avenue Ibn Batouta, Rabat Maroc <BR> Téléphone : (212). 37. 67. 59. 09 <BR> Fax : (212). 37 67 59 09 <BR> INTRODUCTION TO HTML
  33. 33. FORMATTING TEXT WITH <FONT> <ul><li>FONT element </li></ul><ul><ul><li>Add color and formatting to text </li></ul></ul><ul><ul><li>FONT attributes: </li></ul></ul><ul><ul><ul><li>COLOR </li></ul></ul></ul><ul><ul><ul><ul><li>Preset or hex color code </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Value in quotation marks </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Note: you can set font color for whole document using TEXT attribute in BODY element </li></ul></ul></ul></ul>
  34. 34. FORMATTING TEXT WITH <FONT> <ul><ul><ul><li>SIZE </li></ul></ul></ul><ul><ul><ul><ul><li>To make text larger, set SIZE = “+ x ” </li></ul></ul></ul></ul><ul><ul><ul><ul><li>To make text smaller, set SIZE = “- x ” </li></ul></ul></ul></ul><ul><ul><ul><ul><li>x is the number of font point sizes </li></ul></ul></ul></ul><ul><ul><ul><li>FACE </li></ul></ul></ul><ul><ul><ul><ul><li>Font of the text you are formatting </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Be careful to use common fonts like Times, Arial, Courier and Helvetica </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Browser will display default if unable to display specified font </li></ul></ul></ul></ul><ul><li>Example </li></ul><ul><ul><li><FONT COLOR = “red” SIZE = “+1” FACE = “Arial”> … </FONT> </li></ul></ul>
  35. 35. SPECIAL CHARACTERS, HORIZONTAL RULES AND MORE LINE BREAKS <ul><li>Special characters </li></ul><ul><ul><li>Inserted in code form </li></ul></ul><ul><ul><li>Format always & code ; </li></ul></ul><ul><ul><ul><li>Ex. &amp; </li></ul></ul></ul><ul><ul><ul><ul><li>Insert an ampersand </li></ul></ul></ul></ul><ul><ul><li>Codes often abbreviated forms of the character </li></ul></ul><ul><ul><li>Codes can be in hex form </li></ul></ul><ul><ul><ul><li>Ex. & to insert an ampersand </li></ul></ul></ul><ul><li>Strikethrough with DEL element </li></ul><ul><li>Superscript: SUP element </li></ul><ul><li>Subscript: SUB element </li></ul>
  36. 36. TEXT STYLING <ul><li>Underline style </li></ul><ul><ul><li><U> … </U> </li></ul></ul><ul><li>Align elements with ALIGN attribute </li></ul><ul><ul><li>right , left or center </li></ul></ul><ul><li>Close nested tags in the reverse order from which they were opened </li></ul><ul><li>Emphasis (italics) style </li></ul><ul><ul><li><EM> … </EM> </li></ul></ul><ul><li>Strong (bold) style </li></ul><ul><ul><li><STRONG> … </STRONG> </li></ul></ul><ul><li><B> and <I> tags deprecated </li></ul><ul><ul><li>Overstep boundary between content and presentation </li></ul></ul>
  37. 37. Character Formatting <CENTER>Centering</CENTER> <HTML> <HEAD> <TITLE>The Moroccan NODC, Rabat</TITLE> </HEAD> <BODY> <CENTER> <H1>Welcome to The Moroccan National Oceanographic Data Center – Odinafrica - Rabat </H1> </CENTER> </BODY> </HTML>
  38. 38. Attribute Example Purpose size=&quot;number&quot; size=&quot;2&quot; Defines the font size size=&quot;+number&quot; size=&quot;+1&quot; Increases the font size size=&quot;-number&quot; size=&quot;-1&quot; Decreases the font size face=&quot;face-name&quot; face=&quot;Times&quot; Defines the font-name color=&quot;color-value&quot; color=&quot;#eeff00&quot; Defines the font color color=&quot;color-name&quot; color=&quot;red&quot; Defines the font color
  40. 40. HTML Rules (Lines) The <hr /> tag is used to create an horizontal rule (line). Example <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p>
  41. 41. <ul><li>Horizontal rule </li></ul><ul><ul><li><HR> tag </li></ul></ul><ul><ul><li>Inserts a line break directly below it </li></ul></ul><ul><ul><li>HR attributes: </li></ul></ul><ul><ul><ul><li>WIDTH </li></ul></ul></ul><ul><ul><ul><ul><li>Adjusts the width of the rule </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Either a number (in pixels) or a percentage </li></ul></ul></ul></ul><ul><ul><ul><li>SIZE </li></ul></ul></ul><ul><ul><ul><ul><li>Determines the height of the horizontal rule </li></ul></ul></ul></ul><ul><ul><ul><ul><li>In pixels </li></ul></ul></ul></ul><ul><ul><ul><li>ALIGN </li></ul></ul></ul><ul><ul><ul><ul><li>Either left , right or center </li></ul></ul></ul></ul><ul><ul><ul><li>NOSHADE </li></ul></ul></ul><ul><ul><ul><ul><li>Eliminates default shading effect and displays horizontal rule as a solid-color bar </li></ul></ul></ul></ul>
  42. 42. Text Styling <ul><li>Underline style </li></ul><ul><ul><li><U> … </U> </li></ul></ul><ul><li>Align elements with ALIGN attribute </li></ul><ul><ul><li>right , left or center </li></ul></ul><ul><li>Close nested tags in the reverse order from which they were opened </li></ul><ul><li>Emphasis (italics) style </li></ul><ul><ul><li><EM> … </EM> </li></ul></ul><ul><li>Strong (bold) style </li></ul><ul><ul><li><STRONG> … </STRONG> </li></ul></ul><ul><li><B> and <I> tags deprecated </li></ul><ul><ul><li>Overstep boundary between content and presentation </li></ul></ul>
  43. 43. Three Kinds of lists <ul><li>1. Ordered list – is a list in numeric order </li></ul><ul><li><OL> - ordered list </OL> </li></ul><ul><li><LI> - list items </li></ul><ul><li>Unordered list – is one in which list items have no particular order </li></ul><ul><li><UL> - unordered list </UL> </li></ul><ul><li><LI> - list items </li></ul><ul><li>Definition list – is a list of terms, each followed by a definition line, usually indented slightly to the right. </li></ul><ul><li><DL> - definition list </DL> </li></ul><ul><li><DT>- tag used for each term in the list </li></ul><ul><li><DD> - tag used for each term’s definition </li></ul>
  44. 44. Inserting a Graphic Image
  45. 45. <ul><li>Two graphic types of inline images </li></ul><ul><li>Inline Graphics – appear directly on the web page. </li></ul><ul><li>GIF - Graphics Interchange Format – common </li></ul><ul><li>JPEG – Joint Photographic Expert Group – need to convert </li></ul><ul><li>External Image – not displayed with the web page, need a file viewer to display. </li></ul>
  47. 47. Destination – a hypertext document contains links that you can select, usually by clicking a mouse, to instantly view another topic or document. Creating Anchors <A> - tag creates an anchor, text that is specially marked so you can link to it from other points in the document. <A Name = “EMP”>Employment</A> <Name = “PHOTO”>IMG SRC=“Taylor.gif></A>
  48. 48. <A HREF = “EMP”> EMPLOYMENT</A> Link tags – tags that create links HREF – Hypertext REFerence - refer to an anchor that you place in the document. “ #anchor_name” refers to that anchor with a pound (#)symbol.
  49. 49. <ul><ul><ul><li>Attributes: </li></ul></ul></ul><ul><ul><ul><ul><li>SRC = “location” </li></ul></ul></ul></ul><ul><ul><ul><ul><li>HEIGHT (in pixels) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>WIDTH (in pixels) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>BORDER (black by default) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ALT (text description for browsers that have images turned off or cannot view images) </li></ul></ul></ul></ul>
  50. 50. Designing a Web Page with Tables <ul><li>Two ways to insert table on a web page </li></ul><ul><li>Text table – it contains only text, evenly spaced out on the page in row and columns </li></ul>
  51. 51. Web Page Structures
  52. 52. System – is a set of pages, usually created by the same person or group, that treat the same topic and that have the same loo