Web designing using html


Published on

Basic Web Designing

Published in: Technology

Web designing using html

  1. 1. Web Page Designing Using HTML
  2. 2. Do you know these websites?
  3. 3. The Internet <ul><li>The Internet consists of millions of interconnected computers that enable users to communicate and share information. </li></ul><ul><li>The World Wide Web was developed to make the Internet easier to use and give quick access to users. </li></ul>
  4. 4. Structure of the Internet <ul><li>This figure shows the physical structure of the Internet, which uses fiber-optic cables, satellites, phone lines, and other telecommunications media to send data back and forth. </li></ul>
  5. 5. Purpose of Internet <ul><li>For Information </li></ul><ul><ul><li>Sending and Retrieval (researches, facts and figures, etc.) </li></ul></ul><ul><li>For Communication </li></ul><ul><ul><li>Via emails, chat, etc. </li></ul></ul>
  6. 6. Hypertext Documents <ul><li>Hypertext offers a better way of locating information. </li></ul><ul><li>When you read a book, you follow a linear progression, reading one page after another. </li></ul><ul><li>With hypertext, you progress through pages in whatever way is best suited to you and your objectives. </li></ul><ul><li>Hypertext lets you skip from one topic to another. </li></ul>
  7. 7. Linear Versus Hypertext Documents <ul><li>This figure shows how topics can be related in a hypertext fashion,as opposed to a linear fashion. </li></ul>
  8. 8. Web Pages and Web Browsers <ul><li>A Web page is stored on a Web server, which makes the page available to users of the Web. </li></ul><ul><li>To view a Web page, the user runs a Web browser , a software program that retrieves the page and displays it. </li></ul><ul><li>A Web browser can either be text-based, or graphical. </li></ul>
  9. 9. Using a Browser to View a Web Document on a Server This figure shows to view web pages, the user runs a Web browser, a software program that retrieves the page and displays it. PRELIM
  10. 10. HTML <ul><li>stands for Hypertext Markup Language </li></ul><ul><li>the language of the web </li></ul><ul><li>A markup language is a language used to describe the content and format of documents. </li></ul><ul><li>HTML code is easy to use, that even nonprogrammers can learn to use it. </li></ul>
  11. 11. Tools for Creating HTML Documents <ul><li>Text editor such as Windows NotePad or HTML converter or an HTML editor. </li></ul><ul><ul><li>an HTML converter like Microsoft Word takes text in one format and converts it to HTML code </li></ul></ul><ul><ul><li>an HTML editor helps you create an HTML file by inserting HTML codes for you as you work </li></ul></ul><ul><li>Web Browser such as Internet Explorer, Mozilla Firefox, or Netscape Navigator . </li></ul>
  12. 12. Outline <ul><li>1) Your first HTML file - Learn the foundation of HTML and make your first web page. </li></ul><ul><li>2) Editing HTML - More information about how HTML works. </li></ul><ul><li>3) Adding Color - Add some color to your page. </li></ul><ul><li>4) Images - Add graphics to your page. </li></ul><ul><li>5) Text Appearance - Using fonts, bold, italics, etc </li></ul>
  13. 13. Outline (continuation) <ul><li>6) Moving Text – moving text to scroll up, down, left or right . </li></ul><ul><li>7) Lists - Make lists easily. </li></ul><ul><li>8) Horizontal Rules - Learn to make dividers between different sections. </li></ul><ul><li>9) Creating Links - Make a link to another page </li></ul><ul><li>10) Do's and Don'ts - Learn good habits when designing pages. </li></ul>
  14. 14. HTML Tags <ul><li>A tag is a command inside of less than and greater than symbols (ex. <html> ). Most tags also have a closing tag that tells the computer when to stop doing the command. </li></ul><ul><li>Closing tags are written with a / in them. (ex </html> ). </li></ul>
  15. 15. Basic HTML Tags <html> </html> Defines the text file as being in HTML format. This is found on the beginning and end of each web page. <head> </head> The heading area of a the page. The space between these two tags is used for special commands that does not have any connection to the actual formatting of the page. <title> </title> Defines the title displayed at the title bar of the browser window. <body> </body> Found after the <head> tag and is used to define the area of the file which formats the way the web page is seen. <b> </b> Makes text Bold
  16. 16. Your First HTML File <ul><li>To make your first web page, open up Notepad and type in the following: </li></ul><ul><li><html> </li></ul><ul><li><head> </li></ul><ul><li><title>My First Page</title> </li></ul><ul><li></head> </li></ul><ul><li><body> </li></ul><ul><li>Regular Text <b>Bold Text</b> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>
  17. 17. Saving and Running HTML File <ul><li>Save this file as home.html (not home.txt). </li></ul><ul><li>Next, open up the file by double clicking on it </li></ul><ul><li>or typing the location into the location bar on your web browser (ex c:my documentsoutreachhome.html). </li></ul><ul><li>Note the &quot;My First Page&quot; in the title bar of the screen. </li></ul>
  18. 18. Output of home.html title URL or web address body
  19. 19. Editing HTML <ul><li>Now, open your first HTML file (home.html) in Notepad again. To put these two phrases on different lines, we need to use the <p> (paragraph command). </li></ul><ul><li><html> </li></ul><ul><li><head> </li></ul><ul><li><title>My First Page</title> </head> </li></ul><ul><li><body> </li></ul><ul><li><p>Regular Text</p> </li></ul><ul><li> <p><b>Bold Text</b></p> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>
  20. 20. Editing HTML <ul><li>To see the changes made in the Notepad, save the file again. </li></ul><ul><li>Open the Internet Explorer then click on the REFRESH icon </li></ul>Refresh icon
  21. 21. Output of home.html
  22. 22. Editing HTML <ul><li>You can also make the paragraph be centered in the window by using </li></ul><ul><li><p align=&quot;center&quot;> instead of <p>. Or you can right justify a paragraph by using </li></ul><ul><li><p align=&quot;right&quot;>. </li></ul><ul><li>What if you do not want a space between the two lines, like using <p> does, you must use the <br> (break) tag. </li></ul>
  23. 23. Editing HTML <ul><li>Example: </li></ul><ul><li><html> </li></ul><ul><li><head> </li></ul><ul><li><title>My First Page</title> </head> </li></ul><ul><li><body> </li></ul><ul><li><p align=&quot;center&quot;>Regular Text<br> <b>Bold Text</b></p> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>
  24. 24. Output of home.html
  25. 25. Adding Color <ul><li>Adding colors to web pages is relatively simple. Each color has a six digit code assigned to it with a number sign in front of it. </li></ul><ul><li>This code is the Hexadecimal (Hex) Triplet value. Instead of using a number system that goes from 0 to 9, Hex uses a system that starts with 0 goes to 9 and then from A-F. This allows one digit to stand for 16 values instead of just ten. </li></ul>
  26. 26. RGB (#RedGreenBlue) <ul><li>The first two numbers of the code is the amount of red. #FF0000 is red . </li></ul><ul><li>The second two numbers is the amount of green. #00FF00 is green . </li></ul><ul><li>The last two numbers represents the amount of blue. #0000FF is blue . </li></ul>
  27. 27. Adding Colors <ul><li>To change the default colors on the whole page, you need to change an attribute to the <body> tag. The following are some attributes you can have inside the body tag: </li></ul><ul><li>bgcolor=&quot;...&quot; Sets the background color of the page. </li></ul><ul><li>text=&quot;...“ Sets the color of the text. </li></ul><ul><li>link=&quot;...“ Color of links. </li></ul><ul><li>vlink=&quot;...“ Visited link color. </li></ul>
  28. 28. Background and Text color <ul><li><html> </li></ul><ul><li><head> </li></ul><ul><ul><li><title>My Colorful Page</title> </li></ul></ul><ul><li></head> </li></ul><ul><li><body bgcolor=&quot;#0000FF&quot; text=&quot;#FFFFFF&quot;> </li></ul><ul><li><p align=&quot;center&quot;> </li></ul><ul><li><b>My First Home Page</b> </li></ul><ul><li></p><br> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>
  29. 29. An example of a page with blue background and white text.
  30. 30. Images <ul><li>Images are probably the most fun part of web pages. You can put pictures of anything on your web site, from photographs to animations. </li></ul><ul><li>When considering what images you should put up on your site, you must think about the size of the graphic. Keep your graphics as small as possible. </li></ul><ul><li>There are two main types of images on the web: JPG and GIF. These types of formats are highly compressed. </li></ul>
  31. 31. Inserting image in your HTML file <ul><li><body> </li></ul><ul><li><img src=“mickey.gif&quot; width=&quot;50&quot; height=&quot;50&quot; border=&quot;0&quot; alt=&quot;Person&quot; align=&quot;left&quot;> </li></ul><ul><li></body> </li></ul>
  32. 32. Text Appearance <ul><li><FONT size=&quot;2&quot; color=&quot;#FFFF00&quot; face=&quot;arial&quot;>...</FONT> </li></ul><ul><li>- Changes the size, color, and face (font). </li></ul><ul><li>-Size can be a number from 1- 7 or a relative number like +1 (one size bigger than what is already set). Color sets the color of the font using color codes . </li></ul><ul><li>-Face is the font used. The font should be a standard font found on most computers like Arial, Times New Roman, Helvetica, Tahoma, or Courier. You can list different fonts for the computer to try until it finds one that works. Example: </li></ul><ul><li><font face=&quot;verdana, arial black, arial&quot;> </li></ul>
  33. 33. Text Appearance <ul><li><BASEFONT size=&quot;2&quot; color=&quot;#FFFF00&quot; face=&quot;arial&quot;> </li></ul><ul><li>Sets the base (default font size, color, and face for a page). However, often this does not work for all text on a page, for example, text in a table (which we'll cover later). </li></ul><ul><li><BIG>...</BIG> </li></ul><ul><li>Example Makes text big </li></ul>
  34. 34. Text Appearance <ul><li><SMALL>...</SMALL> </li></ul><ul><li>Example Makes text small </li></ul><ul><li><B>...</b> </li></ul><ul><li>Example Bold text </li></ul><ul><li><I>...</I> </li></ul><ul><li> Example Italicized text </li></ul><ul><li><S>...</S> </li></ul><ul><li>Example Strikethrough text </li></ul>
  35. 35. Text Appearance <ul><li><STRIKE>...</STRIKE> </li></ul><ul><li>Example Strikethrough text </li></ul><ul><li><U>...</U> </li></ul><ul><li>Example Underlined text. </li></ul><ul><li> Warning: Underlined text is easily confused with a link! </li></ul><ul><li><TT>...</TT> </li></ul><ul><li>Example Teletype (or monospaced) text </li></ul>
  36. 36. Text Apperance <ul><li><H1>...</H1> </li></ul><ul><li>Example Heading #1 </li></ul><ul><li><H2>...</H2> </li></ul><ul><li>Example Heading #2 </li></ul><ul><li><H3>...</H3> </li></ul><ul><li>Example Heading #3 </li></ul><ul><li><H4>...</H4> </li></ul><ul><li>Example Heading #4 </li></ul>
  37. 37. Text Appearance <ul><li><H5>...</H5> </li></ul><ul><li>Example Heading #5 </li></ul><ul><li><H6>...</H6> </li></ul><ul><li>Example Heading #6 </li></ul>
  38. 38. Moving Text <ul><li>Marquee tag - is a non-standard HTML markup element type which causes text to scroll up, down, left or right. </li></ul><ul><li>Attributes </li></ul><ul><ul><li>Align: Uses the same syntax as the img tag. </li></ul></ul><ul><ul><li>Behavior: Allows the user to set the behavior of the marquee to one of three different types: </li></ul></ul><ul><ul><ul><li>Scroll - DEFAULT. Scrolls the text from right-to-left, and restarts at the right side of the marquee when it has reached the left side. </li></ul></ul></ul><ul><ul><ul><li>Slide - Deprecated </li></ul></ul></ul><ul><ul><ul><li>Alternate - Text 'bounces' from the left side of the box to the right side. </li></ul></ul></ul>
  39. 39. Moving text (continuation) <ul><ul><li>Example: </li></ul></ul><ul><ul><li><marquee behavior=&quot;alternate&quot;>This text will bounce from left to right</marquee> </li></ul></ul><ul><ul><li>Bgcolor : Sets the background color of the marquee. </li></ul></ul><ul><li><marquee bgcolor=&quot;blue&quot;>This marquee's background color will be blue.</marquee> </li></ul><ul><ul><li>Direction : Sets the direction of the marquee box to either left-to-right, right-to-left, up-to-down and down-to-up. Later browsers added support for a movie credit style bottom-up and top-down values. </li></ul></ul><ul><li>< marquee direction=&quot;right&quot;>This text will scroll f rom left to right.</marquee> </li></ul>
  40. 40. Moving Text (continuation) <ul><ul><li>Height : This sets how tall the marquee should be. </li></ul></ul><ul><li><marquee height=&quot;20px&quot;>The height of this marquee is twenty pixels.</marquee> </li></ul><ul><ul><li>Width : This sets how wide the marquee should be. </li></ul></ul><ul><li><marquee width=&quot;100px&quot;>This marquee is only a hundred pixels wide!</marquee> </li></ul><ul><ul><li>Loop : This sets how many times the marquee should 'Loop' its text. </li></ul></ul><ul><li><marquee loop=&quot;2&quot;>You will only see this text twice before it stops playing.</marquee> </li></ul>
  41. 41. Moving Text (continuation) <ul><ul><li>Scrollamount : This is how many pixels the text moves between 'frames', in pixels. </li></ul></ul><ul><li><marquee scrollamount=&quot;10&quot;>This text will move ten pixels per 'frame'</marquee> </li></ul><ul><ul><li>Scrolldelay : This sets the amount of time, in milliseconds, between 'frames'. </li></ul></ul><ul><li><marquee scrolldelay=&quot;1000&quot;>This would be so slow, you'd get no sense of animation.</marquee> <marquee scrolldelay=&quot;1&quot;>This would be so fast, you couldn't see it!</marquee> </li></ul>
  42. 42. List <ul><li>HTML provides an easy way to create lists, ordered (numbered) or unordered (not numbered). There are several other different kinds of lists, but we will cover only a couple of them that will be able to be used for most of anybody's needs. </li></ul>
  43. 43. List (continuation) <ul><li>The ordered list tag is <ol>...</ol>. Inside these tags, you must define the individual list items, <li>...</li>. </li></ul><ul><li>Here is an example: </li></ul><ul><li><ol> </li></ul><ul><li><li>List item #1</li> </li></ul><ul><li><li>List item #2</li> </li></ul><ul><li><li>List item #3</li> </li></ul><ul><li><li>List item #4</li> </li></ul><ul><li></ol> </li></ul>
  44. 44. List (continuation) <ul><li>This HTML should give you the following result when viewed in a browser: </li></ul><ul><li>List item #1 </li></ul><ul><li>List item #2 </li></ul><ul><li>List item #3 </li></ul><ul><li>List item #4 </li></ul>
  45. 45. List (continuation) <ul><li>The unordered list tag <ul>...</ul> is very similar, except the end result will have &quot;bullets&quot; instead of numbers. </li></ul><ul><li><ul> </li></ul><ul><li><li>List item #1</li> </li></ul><ul><li><li>List item #2</li> </li></ul><ul><li><li>List item #3</li> </li></ul><ul><li><li>List item #4</li> </li></ul><ul><li></ul> </li></ul>
  46. 46. List (continuation) <ul><li>Will give you: </li></ul><ul><li>List item #1 </li></ul><ul><li>List item #2 </li></ul><ul><li>List item #3 </li></ul><ul><li>List item #4 </li></ul>
  47. 47. Horizontal Rules <ul><li>HTML also has a simple way of making a horizontal rules (or lines) to divide separate parts of a page up. Horizontal Rule <hr> has several attributes which you can define: </li></ul>
  48. 48. Horizontal Rules (continuation) <ul><li>align=&quot;...“ </li></ul><ul><li>Changes the alignment of the rule. It can be left, right, or center. </li></ul><ul><li>size=&quot;...“ </li></ul><ul><li>The size or height of the rule. </li></ul>
  49. 49. Horizontal Rules (continuation) <ul><li>width=&quot;...“ </li></ul><ul><li>The width of the rule. This can be written as the number of pixels wide (<hr width=&quot;400&quot;>) or as a percent of the width of the screen (<hr width=&quot;75%&quot;>). </li></ul><ul><li>color=&quot;...“ </li></ul><ul><li>The color of the rule (this only works with Internet Explorer). </li></ul><ul><li><hr align=&quot;center&quot; size=&quot;5&quot; width=&quot;80%&quot;> </li></ul>
  50. 50. Links <ul><li>Making a link requires have two HTML pages. So make two and name them &quot;page1.html&quot; and &quot;page2.html&quot; (make sure you save them in the same folder). The link tag, <a> is often called an anchor tag, we'll talk more about anchors later. </li></ul><ul><li>In &quot;page1.html&quot; put the following someplace between your <body> and </body> tags. </li></ul>
  51. 51. Links (continuation) <ul><li>Link to <a href=&quot;page2.html&quot;>page 2</a>. The <a href=&quot;page2.html&quot;> means to make a link to page2.html when you click on the information following it. The </a> part of the link tells the browser to stop the link continue with regular text. The link you just made should look something like the following: </li></ul><ul><li>Link to page 2 . </li></ul>
  52. 52. Links (continuation) <ul><li>There are a couple different kinds of links, relative and absolute. Most of the links you make, like the one we just made, will be relative. Relative pathnames point to files based on their locations relative to the current file, while absolute pathnames point to files based on their absolute location on the file system. We could make our link absolute by changing it to </li></ul>
  53. 53. Links (continuation) <ul><li>Link to <a href=&quot;c:my docspage2.html&quot;>page 2</a>. This link will work on your computer but when you put it up on a site or try it on another computer and the files are no longer on the c: in the &quot;my docs&quot; folder, it will not work. Here are a few examples of relative links: </li></ul>
  54. 54. Links (continuation) <ul><li>href=&quot;file.html&quot;file.html is in the current directory or folder. </li></ul><ul><li>href=&quot;folder/file.html&quot;file.html is located in the directory called folder (and the folder directory is located in the current directory) </li></ul>
  55. 55. Links (continuation) <ul><li>href=&quot;folder/morefiles/file.html&quot;file.html is located in the more files directory, which is located in the current directory. </li></ul><ul><li>href=&quot;../file.html&quot;file.html is located in the directory one level up from the current directory (a.k.a. the &quot;parent&quot; directory) </li></ul><ul><li>href=&quot;../../files/file.htmlfile.html is located two directory levels up, in the directory files. </li></ul>
  56. 56. Links (continuation) <ul><li>To link to another page on the web, not one on your site, you simply need to put the address for the site inside href=&quot;...&quot;. </li></ul><ul><li>A link to </li></ul><ul><li><a href=&quot;http://www.yahoo.com/&quot;> </li></ul><ul><li>Yahoo! </li></ul><ul><li></a > </li></ul>
  57. 57. Links (continuation) <ul><li>Or to make a link for someone to send you an email: </li></ul><ul><li>Click <a href=&quot;mailto:name@domain.com&quot;>here</a> to email me! </li></ul>
  58. 58. Links (continuation) <ul><li>You can also use the <a> tag to create an anchor on a page. You can use an anchor link to let a person click on your link to take you to a different place on the page, like the top for example. The next example will have a link up on bottom of the page that will move you to the top of the page when you click on it. (to make this work, you need enough information on your page to fill up at least one screen). </li></ul>
  59. 59. Links (continuation) <ul><li><html><head> </li></ul><ul><li><title>Anchors</title> </li></ul><ul><li></head><body> </li></ul><ul><li><a name=&quot;top&quot;> </li></ul><ul><li><p>Paragraph 1</p> </li></ul><ul><li><p>Paragraph 2</p> </li></ul><ul><li><p>Paragraph 3</p> </li></ul><ul><li><p>Paragraph 4</p> </li></ul><ul><li><p>Paragraph 5</p> </li></ul><ul><li><p>Paragraph 6</p> </li></ul><ul><li><p>Paragraph 7</p> </li></ul><ul><li><a href=&quot;#top&quot;>To top</a> </li></ul><ul><li></body> </html> </li></ul>
  60. 60. Do’s and Dont’s <ul><li>Think about tags before you use them, some tags only work in some browsers. </li></ul><ul><li>Look at your pages on different computers with different browsers. You might be surprised at the differences browsers, operating systems, and screen sizes effect your pages! </li></ul>
  61. 61. Do’s and Dont’s (continuation) <ul><li>3 .Organize you pages for quick scanning </li></ul><ul><ul><ul><li>Use headings </li></ul></ul></ul><ul><ul><ul><li>Use lists </li></ul></ul></ul><ul><ul><ul><li>Make a menu with all the links on one place </li></ul></ul></ul><ul><ul><ul><li>Important information should stand out! </li></ul></ul></ul><ul><ul><ul><li>But don't use too much emphasis, people won't know where to look </li></ul></ul></ul>
  62. 62. Do’s and Dont’s (continuation) <ul><li>4. Make each page be independent. People might jump to a specific page while missing information on the pages between. </li></ul><ul><li>5. Check your spelling and grammar. Some free HTML editors have spell check built in! If you use Notepad, make sure you double check your spelling. </li></ul>
  63. 63. Do’s and Dont’s (continuation) <ul><li>Group related information. Use tables, graphics, or horizontal rules to split up separate areas on a page. </li></ul><ul><li>Be consistent. This will create a general &quot;feel&quot; for your site. Use of style sheets can help. </li></ul><ul><li>Describe links when possible. </li></ul>
  64. 64. Do’s and Dont’s (continuation) <ul><li>Don't use too many links in your text, it gets distracting. </li></ul><ul><li>Think about your links before you make them. Is it useful? </li></ul><ul><li>Avoid using phrases like: click this link or click here. </li></ul><ul><li>Don't use too many images, these pages take a long time to load. Also, keep images as small as possible. </li></ul>
  65. 65. Do’s and Dont’s (continuation) <ul><li>Use the same image twice when possible, the computer doesn't have to download it each time you use it, it keeps recent images close by. </li></ul><ul><li>Always use the ALT attribute of <img> in case someone has pictures turned off, or doesn't have time to wait for the page to load. </li></ul><ul><li>Be cautious with backgrounds and colored text. Everything should be easily readable. </li></ul>
  66. 66. Do’s and Dont’s (continuation) <ul><li>Each page should have a link back to your home page in case someone gets &quot;lost.&quot; </li></ul><ul><li>Each page should also have a standard signature on the bottom of each page. This can provide contact or copyright information </li></ul><ul><li>Don't say &quot;Under Construction.&quot; Every web page is always under construction. </li></ul>