Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 162.71 KB | None | 0 0
  1. The Internet
  2. You have most likely been online to do research, find a phone number or a map, or read someone’s blog, or online journal. As a matter of fact, you are online right now taking a course for school! You have all used the World Wide Web (WWW, or "the Web," for short) on some level as you‘ve all used the Internet. But do you really know what the World Wide Web is? What is the Internet really? Maybe you don’t really think about that while you’re browsing the Web, but perhaps you have other questions. When you’re browsing through Web sites, do you ever wonder where all that information comes from? Who put all that information there? Where is it actually stored?
  3.  
  4. Everything you see online is physically stored on a computer server somewhere. That’s what the Internet is. The Internet is a huge web of interconnected computer networks located all across the globe. It is a repository, or storehouse, of a vast collection of information provided by millions of people from thousands of different places. The World Wide Web is only a part of the Internet. The Web includes the part of the Internet that you typically see. All the Web sites you visit are considered the World Wide Web.
  5.  
  6. The Internet is an incredible communication tool. It has completely changed the world in which we live. We can shop on the Internet to buy anything from furniture, to clothes, to used CDs. There’s no need to leave the house now. We can shop in our pajamas right there from the comfort of our own home! We also send mail, share files, balance our checkbooks, attend video conferences, and communicate in a multitude of other ways over the Internet. Perhaps some of you have played video games with other live players from all over the world. People attend live business meetings, conduct research, and even order pizza—all online! As you know from personal experience, some of us even go to school on the Internet!
  7.  
  8. URL
  9. With such seemingly limitless amounts of information available online, it�s vital that an efficient organization process is in place. So how is the Web organized? Each Web page has a unique URL. URL stands for "uniform resource locator." The URL is the address that details the specific location of files on the Internet. Look at the example URL below:
  10.  
  11. https://roads.advancedacademics.com/
  12.  
  13. There are three parts to this URL. It usually begins with "http://." This is called the protocol. All URLs begin with a protocol. It tells the Internet browser what procedure it should follow to access the information contained on the desired page. Other protocol examples that you might see are "https://" and "ftp://." The protocol "https://" is essentially the same as "http://" except that it is a secure connection. A secure connection means that all the information from the browser on your computer (everything you type into fields, such as your name, address, credit card number, passwords, and so forth) is protected by security programs on the server you are accessing. The protocol "ftp://" stands for "file transfer protocol." This is a way to store and share files over the Internet.
  14.  
  15. After the protocol, "www" indicates that the desired page is contained on the World Wide Web.
  16.  
  17. In this URL, "advancedacademics.com" is the domain name. (Please notice that URLs are not case sensitive. You will get the same page whether or not it is capitalized, just as in e-mail addresses.) Before we talk more about domain names, we need to discuss IP addresses. All computers that connect to the Internet have an IP address. An IP address is a number assigned to your computer by your Internet Service Provider (ISP) that identifies your location on the Web.
  18.  
  19. "Advancedacademics.com" has an IP address of 67.67.7.40. The domain name "advancedacademics.com" is a just a placeholder for the IP address. So instead of people having to remember "67.67.7.40" in order to visit the Web site, they just have to remember "advancedacademics.com." Go ahead and try it. Type in "67.67.7.40" into your Web browser�s address bar. It will take you to the same site as it would if you typed in www.advancedacademics.com. Also notice that most browsers now do not need you to type in the http://. The browser will automatically assume that it is an http:// protocol unless you type in something different.
  20.  
  21. The domain name, or IP address, tells the browser who the host is for the Web page. A host is simply a computer that is connected to the Internet. In the URL, the domain name directs the browser to the host computer on which the Web page is physically located. Notice the end of the domain name is ".com." This is called a top level domain (TLD). A TLD contains two or more characters that help organize the information on the Web. The most common TLD is ".com." It typically indicates that the site is hosted by a company, but individuals can also buy ".com" domains for their personal Web sites. A TLD reserved for government sites with the United States only is ".gov." Two examples are www.ed.gov and www.nasa.gov. Sites reserved for non-profit organizations have the TLD ".org." Educational institutions use ".edu," while ".mil" is for American military organizations. TLDs are also used to indicate the country of origin for some sites. For example, most sites hosted in Japan end in ".jp." Those in Canada end with ".ca." Other TLDs include ".net," ".tv," and ".biz."
  22.  
  23. Now, let�s look at a more complicated URL:
  24.  
  25. http://www.nasa.gov/audience/forstudents/9-12/features/index.html
  26. Look at all the extensions after the TLD in the URL above. Extensions like "/audience" and "/forstudents" represent the folders on the computer that are physically hosting the site. Extensions tell the browser exactly where on the host computer to find the needed files for the Web page.
  27.  
  28.  
  29. Internet Browsers
  30. Now that we know we’ve got all this information and resources on the Web that are provided by millions of people all around the world, we need to understand that there’s a consistent organization structure for storing that information. But how do we access it? Internet browsers are the graphical interfaces used to access the World Wide Web. Look at the illustration below. The URL of the Web page you want to view is typed into the address bar at the top of the Internet browser. This is usually called the "address bar." When the page loads, the title of the Web page appears in the title bar of the browser at the top of the page. There are five buttons in the tool bar that are common to every browser: the "back," "forward," "refresh," "stop," and "home" buttons.
  31.  
  32. Back Button
  33. The back button takes you to the page you visited previously.
  34.  
  35. Forward Button
  36. The forward button takes you to the page you visited after the current page.
  37.  
  38. Refresh Button
  39. The refresh button reloads the page.
  40.  
  41. Stop Button
  42. The stop button stops the browser from loading a page.
  43.  
  44. Home Button
  45. The home button takes you to a predetermined page that you choose as your home page. This determines which site the browser opens up to when you first start your browser.
  46.  
  47. The home button takes you to a predetermined page that you choose as your home page. This determines which site the browser opens up to when you first start your browser.
  48.  
  49. Browser Window Description
  50.  
  51. Some browsers also allow you to view more than one site at a time using tabs. Another common feature available to most browsers is a search tool right there at the top of the browser.
  52.  
  53. Several Internet browsers are available for free, like Internet Explorer, Mozilla Firefox, Opera, and Safari. Sometimes, there are slight variations in the way different browsers display the same sites. But most well-designed sites will display correctly on browsers of all types.
  54.  
  55.  
  56. What is a Web Site?
  57. A Web site is a collection of one or more Web pages that are all related to each other. For example, www.advancedacademics.com is a Web site. Within that site, there are several different Web pages. The Web pages in a single Web site are all stored on the World Wide Web and have the same domain name. However, they have different extensions to identify particular pages. Look at the following Web pages that are contained within the site www.advancedacademics.com:
  58.  
  59. https://roads.advancedacademics.com/index.html
  60. https://roads.advancedacademics.com/about.html
  61. https://roads.advancedacademics.com/management.html
  62. https://roads.advancedacademics.com/news.html
  63. https://roads.advancedacademics.com/student.html
  64.  
  65. Notice that the protocol (http://), domain name (advancedacademics), and top level domain (.com) is the same for each of the above Web page addresses, but the extensions are all different. The extensions in the above Web page addresses are marked in bold, red text. These represent some of the various Web pages within the site.
  66.  
  67. Look at the first example address in the list above. Notice that the extension is "index.html." This is the site�s index page. The index page of a Web site is the page that loads when the Web site address is typed into a browser. In other words, the following two addresses lead to the same page:
  68.  
  69. https://roads.advancedacademics.com
  70. https://roads.advancedacademics.com/index.html
  71.  
  72.  
  73. Hyperlinks
  74. How are all the Web pages in a Web site linked together? If you’re on one Web page, how do you get to the other pages within the same site? Or to other pages on other sites? Hyperlinks are used to take users from page to page on the Web, or to another place within the same document. A hyperlink, or a link for short, is a connection between a Web page and one of the following:
  75.  
  76. another Web page on the same Web site
  77. another Web page on another site
  78. another location on the same page
  79. a document, such as a .pdf
  80. an image such as .jpg or .gif
  81. Links are often in the form of text. The link usually appears in blue type and is underlined when linked to a Web page or document. Links can also be in the form of an image. When you click that image, it takes you to a different Web site or page.
  82.  
  83. Web Page Titles and Favicons
  84. Some things are the same for all Web pages. For example, all Web pages should have a title. (If a title is not found, it is because the writer of the Web page did not include a title tag within the coding.) When you are viewing a Web page through an Internet browser, you can see the Web page title in the title bar of the browser at the very top of the page. In the screenshot below, you can see that the Web page title is "Advanced Academics – online learning simplified."
  85.  
  86.  
  87.  
  88. You can also see the Web page’s title when you have it minimized. As you can see in the screenshot below, the title appears in the minimized window as well. This helps you know which to click on when maximizing your screen again.
  89.  
  90.  
  91.  
  92. Some Web sites also have a favicon. This is a small icon that is shown in the address bar of the Web browser to the left of the Web site address. Notice how the favicon below is a stylized "A" that represents Advanced Academics. Most favicons are representative of the company name and soon become recognizable.
  93.  
  94.  
  95.  
  96.  
  97. What is an Interface?
  98. Have you ever wondered how Web pages are designed? Why are some easier to go through than others? The first thing most people think about when designing a new Web site is what it’s going to look like. They think about the colors they will use and the shapes of the buttons. They imagine the animations they want to have and what links they will include in the menu. Basically, they are gathering ideas for the design of the Web site’s interface. An interface is the visual appearance that links a user with the tools and workings of an electronic program. In other words, the interface is what you see on the screen. Interfaces make it much easier to use the powerful, complex tools that computers provide. They shield users from the technology working behind the scenes. This makes computers "user friendly" and easy to work with.
  99.  
  100. What if we didn’t have the interfaces that operating systems such as Microsoft Windows and Apple OSX provide? We would all have to be able to use DOS, UNIX, or other text-based codes to use our computers. The visual interfaces (called GUI interfaces – G=Graphical, U=user, I=Interface) given by these operating systems allow users to work around all the code involved. GUIs create a friendly buffer between the user and the techno-babble that many don’t understand.
  101.  
  102. All types of electronics have interfaces. These include cell phones, DVD players, and computer programs. For example, the menu that appears on your TV screen when you put a disc into your DVD player is an interface. The DVD menu lets you choose the chapters, special features such as the bloopers, and other features on the DVD. You don’t have to physically move the needle onto the disc like your parents and grandparents probably had to do with their old turn tables (record players). You just choose an item from the DVD menu. The machine knows exactly what you want it to do.
  103.  
  104. Web pages are also interfaces. For example, Amazon.com’s Web site acts as the interface for a huge database of books, music, software, and much more. The site lets users search for products by author, title, genre, and other options. Customers can use the interface to browse this giant database for specific information, which then appears on individual Web pages. Users never actually see the database. They also don’t have to create queries or pull up tables of information. All of that takes place behind the scenes.
  105.  
  106. Advanced Academics’ online learning platform, ROADS, is another example of an interface. You are using it right now. ROADS lets you take your online courses without having to see all the code used to create them. Look at the screenshot of the ROADS interface below. Every part of the interface was planned. This includes all pieces from the position of the logo in the upper left corner to the snap menus on the right side of the screen. These make ROADS tools and activities easy to get to and use.
  107.  
  108.  
  109. Advanced Academics online learning platform, ROADS
  110.  
  111. Which Comes First: Form or Function?
  112. When designing and creating a software application, DVD player menu, Web site, or other interactive software, there are two major pieces involved. These are the application itself (the code or database that makes the program work) and the interface. Here are two ways to go about designing an interactive interface:
  113.  
  114. Design the visual interface first
  115. Design the visual part of the application first. This must be done before building the application’s structure or database that will hold all the content users will see. This step involves interaction design—determining what happens when a user clicks on something. For example, let’s say you are designing an interface for a course Web site. You might start with the visual interface by looking at what menu options the students would want to see. Your list might include "Course Announcements," "Calendar," "Communication," and "Resources." Within the "Communication" section, you might include e-mail and a list of forums. Under the "Resources" section, you might want to place several research articles. A list of links to useful sites would work there as well. Once you decided what the students need to see, you would design the application.
  116.  
  117. Design the structure of the application first
  118. You could also figure out how you want the information shown in the application before building the interface. In other words, decide how everything in the application is organized before designing how people will get that information. Let’s look again at the example of designing a course Web site. When designing the application first, the designer has to think a little differently. Rather than organizing the data by menu items, the designer might organize it by user permissions. For example, the design might include course announcements and a course calendar. The teacher or administrator would need the ability to create or edit those items. Students, on the other hand, would only be able to view the information, not edit it. Students also would need access to e-mail, forums, research articles, and a list of links. Some of these they would need to be able to edit. Students would need to be able to e-mail their classmates, participate on the forums, upload or download research articles, and add to the list of links. With this knowledge, the designer could make sure the interface design meets both the teachers’ and students’ needs.
  119.  
  120. Which method works the best? Most designers believe it’s more important to design the background structure first. A common motto among designers is that "form follows function." This means you first should design how you want your interface to work. Then let the visual form of the design follow. For example, imagine trying to design the interface for a Web site like Amazon.com or imdb.com. Amazon.com is an online database of books, music, and just about everything else you can buy. Imdb.com is an Internet Movie Database. It has information about almost any movie ever made, every actor who ever starred in a movie, and any director, producer, animator, and participant ever involved in a movie. Wouldn’t it be hard to design useful interfaces for such huge, complex databases if you didn’t first design the databases themselves?
  121.  
  122.  
  123. Designing Interfaces
  124. It might be important to design how a site works before you design the interface. However, the final design of the interface is equally important. The design of the interface has a huge effect on the Web site’s ease of use.
  125.  
  126. Everyone has at some point tried to use an interface that wasn't well designed. To avoid such problems, interface designs should get the same care and attention that other designs do. A Web site or application with a poor interface looks unprofessional. That makes the user wonder if the content is accurate.
  127.  
  128. Interface designers also need to control what the viewer sees. For the most part, designers of print materials have complete control over what the viewer sees. Even if the reader has selective attention, designers can still put pages together in a way to pull the reader's eyes to certain pieces. Web site designers can hand that power over to viewers. This lets viewers control what they see when they visit their site. Cookies, or files stored on your computer that contain user preferences, and settings menus let viewers customize content to their wants and needs. Interface designers have to pay special attention to make sure that good communication and functionality are in place. This must be done even though the user might be changing the content and design style to meet his or her needs.
  129.  
  130. A good Web site design should also include what we know about the world around us. We must think about how we interact with the world and other people. Then put that knowledge into the design. For example, people know what a trash can is for. In many operating systems, to delete a file you drag it to an icon shaped like a trash can. This is something that’s easy even for novices (beginners) to figure out. Everyone has used a trash can before. It is not easy for many people to use technology, even with graphic interfaces. Designers should think about these people as well and design interfaces to copy real-world activities and tools. Knowing how well some users understand technology will help the designer know what level of support the interface needs to have.
  131.  
  132. The visual piece that links a user with the tools and workings of a computer program, its interface, must be designed to suit those who will use it. Easy-to-use interfaces help make a product successful. They make the product usable for customers. When designing a Web site, make sure you think about the product’s users. Think about their level of experience, how nervous they may be about technology, and what it takes to keep their interest.
  133.  
  134.  
  135.  
  136. Question Number 1 Points: 5.00/5.00
  137. Question Text
  138. Which of the following is a visual element that links a user with the tools and functionalities of a computer program?
  139. Your Answer
  140. B. Interface
  141. Question Number 2 Points: 0.00/5.00
  142. Question Text
  143. What is the most important thing a designer should be concerned about when designing an interface?
  144. Your Answer
  145. D. Whether or not the interface is visually appealing
  146. Question Number 3 Points: 5.00/5.00
  147. Question Text
  148. Which of the following is a motto graphic designers follow when designing the underlying structure of an application?
  149. Your Answer
  150. C. Form follows function
  151. Question Number 4 Points: 5.00/5.00
  152. Question Text
  153. Which of the following is considered an interface?
  154. Your Answer
  155. 7508396:A. An Internet browser used to access a Web page ,7508397:B. The buttons on the screen of an ATM
  156. Question Number 5 Points: 0.00/5.00
  157. Question Text
  158. Which of the following is an important initial step in designing an interface?
  159. Your Answer
  160. D. Setting up links
  161.  
  162. Audience
  163. When you start designing a Web site you need to think about your audience. These are the people for whom the Web site is made. Not all Web sites are meant for the same groups of people. Before beginning, ask yourself who is going to visit your site. Whose attention are you trying to get? Is your Web site meant for young people your own age, for buyers of a service or product, or for anyone of any age?
  164.  
  165. For example, an online tutorial on algebra skills might be designed for an audience of middle school, high school, or college students. All three of these audiences have different needs. This means three different site designs might be needed. A record company’s Web site might be designed with a hip, teenage crowd in mind. But those going to a Web site for a hearing aid would most likely be elderly.
  166.  
  167. Designers must also consider if the audience for a Web site will be international or local. This is a major factor when deciding what language or the amount of graphics to use. Most users on the Web are not English speakers. An even larger majority do not speak English as their native language. You need to think about your audience’s culture when designing your Web site. One term might mean something in the U.S. while it has a completely different meaning somewhere else in the world.
  168.  
  169. Imagine having to design the Web site for the Olympics. You would have to cater to all the different languages from countries all around the world on one single site. You’d probably have to use a lot of symbols in place of words. However, you’d also have to be very careful as to which symbols you used. The same symbol can have very different meanings for different cultures. For example, in the United States, we usually link the dog with loyalty. The Chinese culture has similar meanings for the dog. However, in Islamic cultures, the dog represents dirtiness. Choosing one symbol to represent one emotion or message that is the same for all cultures is very difficult.
  170.  
  171. Remember the importance of designing for your audience. When a Web site has been created with the audience in mind, it should easy to identify the intended audience just by looking at the site. Most designers conduct an audience analysis before creating a site.
  172.  
  173.  
  174. Audience Analysis
  175. Audience Analysis
  176. You need to know as much about your audience as you can to be a good Web site designer. The Web site design must work for the intended audience and serve its audience’s purpose. For that to be the end result, the designer should conduct research on the audience by doing an audience analysis. An audience analysis helps you decide what type of user will be using your Web site.
  177.  
  178. Let’s look at an example. To help raise the reading abilities of preschool children, you'll design a Web site that teaches the phonetic sounds of the alphabet. As the designer of this Web site, you do a lot of research in the areas of reading and preschool education. You design and develop the Web site based on your research findings. The site uses all the proper instructional methods. It is creative and interactive. In theory, it should be very successful. But there’s one major problem. The software is too complicated for preschool children to use. You, the designer, forgot to do a full audience analysis before designing the software. Now it’s almost useless! Do you understand now how analyzing your audience is a main part of the design process?
  179.  
  180. Lenny Laskowski, a professional speaker who wanted to easily remember how to analyze his audience when preparing to give a presentation, created an acronym from the word audience. I’ve modified his acronym just a little bit so it applies to Web site design as well.
  181.  
  182. A
  183. Audience:
  184. Who will be visiting the Web site?
  185. U
  186. Understanding:
  187. How much does the audience already understand about the content of the Web site? How well does the audience understand technology?
  188. D
  189. Demographics:
  190. What is the audience's age, gender, and educational background?
  191. I
  192. Interests:
  193. What types of things is the audience interested in?
  194. E
  195. Environment:
  196. In what environment will the Web site most likely be accessed?
  197. N
  198. Needs:
  199. Does the audience have any specific needs that need to be addressed in the design of the site?
  200. C
  201. Context:
  202. In what contexl will the Web site be used? What will its purpose be?
  203. E
  204. Expectations:
  205. What does the audience expect to get from the Web site?
  206.  
  207.  
  208. Audience Analysis
  209. A
  210. Audience:
  211. Who will be visiting the Web site?
  212. Audience is important in Web site design. In most cases, the whole purpose of a Web site is to encourage someone to do something. Advertising Web sites are designed to get people to buy or act. Informative Web sites are often designed as sales tools. They also may be designed to help people research and find information. Instructional sites are designed to help people learn. As you can see, understanding your audience and using that understanding in your design will help your Web site be a success. Without knowing who your audience is, how can your Web site possibly be helpful?
  213.  
  214. U
  215. Understanding:
  216. How much does the audience already understand about the content of the Web site? How well does the audience understand technology?
  217. Figuring out what the audience already knows and understands when developing your site content is vital. It helps you decide how much and what kind of information to include. You want to provide enough information in your design to help the message come across clearly. However, you don’t want to include information the audience already knows. You want to give the right amount and right kinds of information so you don’t bore the audience. This only wastes space and time reminding users of what they already know, or can cause mental overload.
  218.  
  219. For example, let’s imagine you’re designing a Web site that will host an online puppy training course. You must know how much the audience, each current or potential dog owner, already knows about puppy-training and about dogs in general. If you don’t provide enough information on the Web site, it won’t be useful. However, you don’t want to give too much detail either. This can cause the audience to be offended and feel that you are talking down to them. Even if that’s not the case, the extra information may just get in the way of and distract from the main information. That’s why it’s important to find out how much the intended audience knows about puppy training when designing the Web site. To do so, you might ask several questions. Is this the audience’s first training class? Is this a first puppy? Is this a first pet? Having this information will make it easier to know how much information to include in the materials. Keep in mind, though, that there usually is more than one person in the audience. The individual needs of each person will differ. You must think about these differences when analyzing the audience as a whole.
  220.  
  221. Typically, if the individual needs of your audience differ dramatically, you’ll want to create separate designs for each group. For example, if some people taking the puppy training class just got their first dog, but several others have had three or four dogs before, you might want to have two sections on the Web site. They could be "Puppy Training for Beginners" and "Puppy Training: A Refresher Course." If you’d rather not separate the site, you still must find these differences and account for each of them in your one design.
  222.  
  223.  
  224. D
  225. Demographics:
  226. What is the audience's age, gender, and educational background?
  227. The demographics of the audience refer to the shared traits of the people in the audience. Demographics include information about average age, race, gender, educational background, and so forth. This information is important because it gives you a better understanding of your audience. It tells you what the audience can do, its culture, its attitudes, and even its level of education. Again, there are often individual differences among the people in the audience. Not everyone in the audience will have the exact same background. Some may have a college degree while others might not have graduated from high school. In this case, it’s always safe to design your Web site at the standard, sixth-grade reading level followed by most newspapers and magazines. As a Web site designer, you don’t always have to address each demographic in the audience. However, understanding the basics can guide you in your site design.
  228.  
  229. When analyzing the audience’s demographics and what they mean for your site design, please be aware of racial and ethnic stereotypes. Avoid stereotyping groups of people. Don’t make assumptions about your audience based on their demographics. You should complete your research to make sure all of the information you are collecting is true and fair to your audience.
  230.  
  231.  
  232.  
  233. I
  234. Interests:
  235. What types of things is the audience interested in?
  236. What are the audience’s interests? Designing with the audience’s interests in mind will result in a Web site that will better gain and keep the audience's attention. For example, let’s say a Web designer has two clients. They are Rev It Up, a company that restores and sells classic cars, and Sylvia Platt, Redman College president. In many ways, the intended audiences for these two Web sites are very similar. But do you think the sites should be designed similarly? No way! The two audiences have completely different interests. For example, people visiting the Rev It Up Web site are far more likely to be interested in seeing pictures of cool, restored hot rods and a catalog of parts for classic cars. People visiting the Redman College president’s Web site are more likely to be interested in reading a letter from the president.
  237.  
  238. Also, think about how products like cars and shoes can be offered in a variety of colors. Products are made to appeal to a very wide audience with different interests. The choices of colors and styles available in a Web site design serve these different interests well. The audience’s interest should be a key in design.
  239.  
  240. E
  241. Environment:
  242. In what environment will the Web site most likely be accessed?
  243. Sometimes the environment, the place in which your Web site will be used, affects the design process. To know your site’s potential environment, ask yourself about the people and situation. For example, if you are designing an online card catalog site for the local library, you’ll need to think about that environment. The site will most likely be used in the library. You’ll want to avoid using any sound effects on the site so you don’t offend the other visitors. Are the instructions both clear and brief? The people reading the instructions probably won’t want to spend too much time on the site. They would rather quickly find the information they’re looking for and move on.
  244.  
  245. N
  246. Needs:
  247. Does the audience have any specific needs that need to be addressed in the design of the site?
  248. Are there any specific needs the audience has, such as accessibility issues or low vision? If so, you should try to meet these needs in your design. You must know and assess these needs before beginning your design. This goes back to that a standard rule in graphic design: Your solution must work! Your design solution must meet the audience’s needs! For instance, images are great, but the blind can’t see them. If designing a site for the visually impaired, it’s important to think of an alternative to images and frames.
  249.  
  250. Consider a life raft instructions sign as an example. The audience has many needs here. They need to quickly identify how to access, board, and use the life rafts. All the while, they need to keep a calm composure. The design and color of the sign can help achieve all of these needs by giving clear, straightforward instructions, diagrams, and illustrations that instruct passengers and encourage people to stay calm.
  251.  
  252.  
  253.  
  254. C
  255. Context:
  256. In what contexl will the Web site be used? What will its purpose be?
  257. You also need to think about the context in which your site will be used. Are you designing for co-workers at the workplace, fellow students at school, or for the public in general?
  258.  
  259. If you’re designing a company’s Web site, you’ll want to steer away from loud color schemes or styles. This type of site should be professional, use the appropriate language, and be clean and clear.
  260.  
  261. On the other hand, if you’re designing a Web site to show off pictures from your grandparents’ fiftieth anniversary party, you’ll probably make the site more playful and fun. Don’t bore your audience to death with lifeless pages! Add some flair by using colors, photographs, and text. You can even add music!
  262.  
  263. Finally, if you’re making a Web site to present your research report for your class at school, you’ll want to add illustrative graphics and interesting examples. You should make sure that you don’t offend your audience with a childish design. But you also shouldn’t assume your audience knows more than it does, either.
  264.  
  265. E
  266. Expectations:
  267. What does the audience expect to get from the Web site?
  268. For most Web sites, the intended audience expects certain things. You must think of these expectations when working on your site design. For example, users tend to have very specific expectations of the Web sites they visit. These are getting more and more common as the Web becomes more popular. Users expect to see certain links and information. If this information is not there or is not easy to find, the user will leave and find the information on another site. Being aware of exactly what users will want from the Web site you’re designing will help your design meet their needs.
  269.  
  270.  
  271. Finding What You Need
  272. When you go to the grocery store, you expect to find certain items in certain places. You expect vegetables to be kept with other vegetables. Your favorite boxes of cereal should be stocked near the oatmeal and other breakfast items. Imagine how hard a simple trip to the grocery store would be if all the products were unorganized. Even when items are organized, signs help people find what they are looking for. These signs help you to easily navigate through the store and find what you’re looking for without having to stroll down every single aisle.
  273.  
  274. Web site navigation is similar to grocery store navigation. Organization and signs help you find your way through a site, just like in the store. Finding your way around a Web site should be very easy. Like the signs above grocery store aisles, Web site interfaces should contain visual cues that lead users to where they want to go. Web site designers must think about ease of navigation.
  275.  
  276. Navigation Elements
  277. Have you ever visited a Web site and had no idea where to go? Perhaps you didn’t know where to click to find the content on the site. Maybe the menu system was confusing. Maybe it just didn’t seem to work. When designing the navigation for a Web site, it’s important to make the navigation elements clear and easy to use. Web site visitors must be able to see their navigation options immediately upon entering. They must be able to find their way around your Web site. Navigation should be intuitive, or instinctive.
  278.  
  279. Some Web site interfaces use a menu system. Others provide buttons or links. No matter what navigation elements a Web site uses, those elements must be designed well. Users should know exactly what they are looking at when they first view a Web site's interface. Visitors should also know what they are supposed to do now that they are there. All users should be able to do what they need to do, or find what they want, in very few steps. For example, your Web site might have a "Contact Us" link in the menu that simply leads to an e-mail address. You might want to change "Contact Us" to "E-mail" and link it directly to the e-mail address. This saves the user one step, cutting in half the number of steps it takes to find an e-mail address.
  280.  
  281. Common navigation elements are:
  282.  
  283. Buttons
  284. Text links
  285. Drop-down menus
  286. Tabbed menus
  287. Buttons
  288. Navigation Buttons
  289. Your Web site design should make it obvious to the user what’s clickable and what’s not. For starters, compare the intuitive buttons and links in the table with those that are not.
  290.  
  291. Of the two gray "Pictures" buttons, see how the one on the left has a raised edge. It looks like an actual button. This button is an intuitive navigation piece because people relate this image to that of an actual button they can push. The button on the right, however, is flat. It is not intuitive because it doesn’t look like it can be pushed. It is not clear that clicking on this image will lead the user anywhere. You can’t even tell that you should click on it. Buttons, when designed well, are good navigational elements because they pull attention and are easy to spot. The problems with buttons are that they can be clunky, take up too much space on a screen, and take longer to download than text links. This is because buttons are a type of graphics.
  292.  
  293. Text Links
  294. There also are two examples of text links in the table. Linked text can take any form or color. However, people familiar with the Internet know that bright blue, underlined text has become a standard sign of a hyperlink. The plain, black text doesn’t look like a link. It just looks like text. Even if it was a different color, people still would think of it only as text. They may not realize they can click on it.
  295.  
  296. Designers sometimes stay away from such standards or design conventions. Some seek to come up with more creative solutions instead. There is nothing wrong with that, but keep in mind that such standards became conventions for a good reason—they work. When designing a Web site’s interface, sticking with navigation elements that are obvious or easy to spot will make the site easier to use. For example, setting hyperlinks in blue, underlined text is clear to the user. Text links are great for navigation because they load very quickly and are easy to spot.
  297.  
  298. Drop-down Menus
  299. Drop-down menu
  300. Drop-down menus are great when there isn’t much screen space in an interface. Look at the example of a drop-down menu shown here. The darker pink bar across the top is the main menu bar. It lists the links for "About Us," "Products," "Services," "Portfolio," and "Contact Us." When each of these links is clicked, a submenu drops open below it. Any menus within the submenu pop out to the side. Notice how the actual menu bar in this example only takes up a small amount of space when it’s not expanded. In this way, drop-down menus save screen real-estate. This is the amount of space available on a screen to display information.
  301.  
  302. Drop-down menus are also great ways to organize information on multiple levels. For example, a menu may have five items in it, each with several subheadings. Drop-down menus can organize this hierarchy of information. The example shows three different levels of information. "About Us" is at the top level, "Employee Profiles" is at the second level, and the individual profile for Craig Jonathan is at the third and lowest level.
  303.  
  304. The main problem with drop-down menus is that earlier versions of some Internet browsers don’t support that style of menu. Users with these browsers or text readers may not be able to view and use the menu system.
  305.  
  306. Tabbed Menus
  307. Tab menu
  308. Using tabbed menus is another great way to save screen real-estate. Sometimes, the information on a site can be broken up into a handful of clear categories. Tabs can be used to move between these various sections. Just about everyone has used tabbed separators in three-ring binders or tabbed file folders. When Web site tabs reflect their real-life uses, this navigation becomes intuitive. Look at the example above of a tabbed menu system. You can click on five separate tabbed categories. Each tab leads to a submenu (see the blue hyperlinks at the top of the tab). This overlaps information and saves a lot of screen space.
  309.  
  310. Look again at the above example. See that the tabbed menu system is made so that the chosen tab (Movies) appears to be in front of the other tabs. That is done by not using a horizontal line to separate the tab itself from the content area. Color can also make it stand out. The color of the open tab is different from the color of the other tabs.
  311.  
  312.  
  313. Types of Navigation
  314. There are several ways to organize the information within a Web site or application. This is known as the information structure. You should decide on your information structure before beginning any design. An interface’s navigation tools depend on this structure. There are five types of navigation, or information structures. They are:
  315.  
  316. Linear
  317. Reciprocal
  318. Sequential
  319. Hierarchical
  320. Web
  321. Linear Navigation
  322. Linear navigation is a one-way, sequential order of frames. It only moves forward. The user only has the option to go to the next frame. Linear navigation presents information like a slide show in which you can’t go backwards to parts you’ve already seen.
  323.  
  324. Pages connected with right arrows, showing that moving back is not possible.
  325. Linear navigation is used when the information structure of the application is very simple and needs to be shown in order. It’s also good when users are not as comfortable with computer technology and/or interactive applications. This type of navigation is good for tutorials and training modules. For these, it’s important for the information to be given in order. It keeps the learner moving forward.
  326.  
  327. Reciprocal Navigation
  328. Reciprocal navigation is very similar to linear navigation. The difference is that the user is able to move back and forth between frames. Reciprocal navigation presents information like a book. You can flip pages from beginning to end, and you can also flip back and forth between pages to review earllier content.
  329.  
  330. Pages connected with double direction arrows.
  331. Reciprocal navigation is also good when information needs to be shown in order or when users are not comfortable with computers and/or interactive applications. In an interface that uses reciprocal navigation, the two main navigation elements provided are "Next" and "Back" buttons. This is similar to a linear navigation. "Escape" and "Exit" buttons are also frequently used. Users are unlikely to get confused because the navigation choices are limited. Because they are so simple. these are good information structures for users who may not be comfortable in an online environment.
  332.  
  333.  
  334. Sequential Navigation
  335. When the information structure of an application is a little more complicated, you might be able to use sequential navigation. Sequential navigation shows frames in a straight line. This is similar to linear or reciprocal navigation because it shows frames in a certain order. However, some frames break off into secondary sets of linear frames.
  336.  
  337. Multi-level pages connected with single direction arrows.
  338. This is a common type of navigation used with a simple menu system. It is often used in tutorials and training modules. In sequential navigation, the menu may give five links that must be viewed in order. Each link leads you to a short, linear tutorial. At the end of the tutorial, you are taken back to the menu and given the option to click the next link in the menu.
  339.  
  340. The online course you are taking now uses a form of sequential navigation. You move linearly through each module one at a time. But within each module there may be multiple pages that you must view linearly as well. Sequential navigation can be set up linearly or reciprocally. With the ROADS system that Advanced Academics uses, the navigation is reciprocal. You are able to move back and forth between the pages at will. Take a moment to look at the navigation elements of this system.
  341.  
  342. Navigation bar.
  343. The navigation bar at the top of the page lets you move back and forth between ROADS sections, or modules. In the image above, the row of frames at the top of the sequential navigation represents these modules. Within each module, a smaller navigation bar lets you move back and forth between the pages. The second row represents these individual module pages.
  344.  
  345. When designing navigation, be certain not to leave users hanging. Provide a "Home" or "Back" button, as well as an "Escape" or "Exit" button, on every page. This gives users the option to move forward, back, or out of the application at any time. The more complex the application’s information structure, the more aware the designer must be of the navigation built into the interface. Navigational controls must be on every page to which an application links.
  346.  
  347.  
  348. Hierarchical Navigation
  349. The most commonly used navigation system is hierarchical. Hierarchical navigation organizes groups of information structures into many levels. It is used for more complex information structures. Hierarchical navigation actually includes a variety of other navigation styles.
  350.  
  351. Look at the illustration of a hierarchical navigation structure shown below.
  352.  
  353. Multi-level pages and multi-directional arrows.
  354. The frame at the very top is the main frame. This is where the menu is found. The frames in the second row (level) mark the different menu items. From here, some frames break off into groups of linearly-organized frames. Others contain submenu systems. Do you see how a hierarchical system can use other forms of navigation?
  355.  
  356. Because hierarchical navigation systems provide more options, they give the user a sense of control. This is good for the user because he can choose where he wants to go. If the user is new at using computers, this freedom might be bad. Hierarchical navigation gives the user so many choices that it may confuse or overwhelm him.
  357.  
  358.  
  359. Navigation
  360. Menu Systems
  361. Whether users are novices or experts, they typically act the same way when visiting a Web site. Most users are in a hurry. They don’t take the time to figure out how a Web site is organized. They dive right in and click on links. They just dig through the application, trying different options and links until they find what they want. It is important to design a logical menu that gives about five to eight items. The number should not go above eight no matter what form the menu system takes. This is true whether it’s a drop-down menu, list of links, row of buttons, or a tabbed system. A more complex menu system will only confuse your user. This will make her have to think much more than she wants to. So keep the menu simple. By using no more than eight items, it will also fit on the first screen that appears when the user logs in. This simplicity will mean that users don’t need to “cursor” down in order to see the entire menu.
  362.  
  363. Users tend to click the first menu option or link that seems like it might give the information they want. Even if there is a better option below it, users don’t continue looking. They just click and go. Because of this, you must name menu items clearly.
  364.  
  365. Making your site less confusing will make it more successful. To avoid confusion, menu items should be intuitive. Users should be able to know exactly what the menu item has to offer before they click on it by reading its title.
  366.  
  367. Look at the examples below.
  368.  
  369. Sample buttons.
  370. Let’s say a user has concerns about an order she recently placed with a company. She visits the company’s Web site to find an e-mail address. When the user sees the options above, she will be confused. Each of these options could contain the needed information. When designing these types of user options, you should ask yourself the following questions:
  371.  
  372. Can I minimize the number of menu options by combining one or more of them? Can I rename the menu buttons to better distinguish them from one another? Neither one of these strategies may be an option for you. If you use multiple links, provide the information in question (the e-mail address) in each of these application areas. That way, no matter which button the user chooses to click, she will find what she's looking for.
  373.  
  374.  
  375. Sitemaps
  376. Example Site Map
  377. Sometimes, users just can’t figure out a menu system. They may not be patient enough to try. A sitemap can be provided when the Web site has a complex information structure. A sitemap is an organized hierarchy of links to every page or frame in a Web site. Sitemaps can be organized in multiple ways.
  378.  
  379. Look at the graphic to the right. It is a sample sitemap for the Web site of a small bookstore. This is just one example of how a sitemap can be organized visually. Like all sitemaps, each frame or page is listed individually. The information structure, or the hierarchy of the site, is shown visually. The levels of the hierarchy are easy to see. It is obvious that the highest level of the hierarchy contains three links: "Books," "Movies," and "Customer Support." These three main menu items (links) are separated from the submenus. They appear at the left of the screen and away from the other links. This makes the main menu items stand out. Another way to tell each main menu item apart is to use different colors. This example shows each level in the menu in a different color. The different colors reinforce and emphasize the three items in the highest level of the hierarchy. The submenu items are set apart as well. They appear in the center of the screen, while the lowest level of the hierarchy appears on the far right. Each item in this site map also links back to its named frame or page.
  380.  
  381.  
  382. Marking Location
  383. Just like Web sites that use linear or reciprocal navigation, Web sites with hierarchical navigation should give the user a sense of context. This lets users know where they are within the site. Context is a little more complicated with hierarchical Web sites than simply providing a "Page x of x" note or another simple progress tracker. There are many ways to display options within menu systems to let users know where they are within a site. The following graphic displays some of the more common methods.
  384.  
  385. Examples of user location markers.
  386. Breadcrumbs
  387. Users need more guidance in more complex sites. Users need to know the scale of the Web site they are working with. They need to know how big the application is. They need to know where they are within the application in relation to other frames or areas of the site. Users also want to have an idea of where they are going. How many frames will they be looking at?
  388.  
  389. Breadcrumbs are often used to give the user a sense of context. Breadcrumbs are lists of links that show the hierarchy of the frames that the user has visited to reach his current location within a Web site. Breadcrumbs tell users where they are in relation to the Web site as a whole. The whole idea of a breadcrumb is that the user can leave something behind everywhere he goes. Imagine dropping breadcrumbs everywhere you go while eating a sandwich! Breadcrumbs keep track of where users are and where they’ve been. They also help you find your way back to a point you want to go to. It works the same as dropping breadcrumbs along a path in the woods.
  390.  
  391. Example of breadcrumb links.
  392. Notice the symbols used between the links in the example above. The symbols that separate these layers of information can vary. In the example, the greater than symbol (>) is used. This is the most common symbol in situations like this. It works well because it looks like forward movement. It also suggests that the links listed first are larger, or higher in the hierarchy. Other symbols, like forward slashes (⁄), colons (:), or straight vertical lines (|) can also be used.
  393.  
  394. Notice the size of the text. Small text is used because breadcrumbs are not a main part in an interface. There is usually a main menu system in addition to the breadcrumbs. Notice also how the last item in the breadcrumb is a different color than the rest of the text. This last item shows the user’s current location. It should stand out in some way by being either bold or colored.
  395.  
  396.  
  397. Navigation
  398. Web Navigation
  399. Web navigation, as its name suggests, is the most common type of navigation used in Web sites. Web navigation shows many frames or sites of information that are linked to other related frames or sites. This is exactly how the Internet is organized. Countless Web sites are available. They all linked to each other in a variety of ways. The frames or sites involved in a Web navigation system are not grouped into organized categories. They are just linked to each other as needed.
  400.  
  401. Wb navigation of multiple pages linked to multiple pages.
  402. Web navigation is very pleasing. It gives the user the greatest sense of control. The user has many options of where to go. However, this type of navigation can also be confusing. It’s really easy for users to miss pieces of information if they don’t click on all the links. Many users are just looking for one piece of information on a site. Since most aren’t looking to view every single piece of information on the site, this type of navigation is very good.
  403.  
  404. Providing a Sense of Context
  405. In simple information structures, like the ones that use linear or reciprocal navigation systems, users can’t really get lost. However, users do need a sense of context to know where they are in relation to the Web site as a whole. This is needed when there are several pages within one site. It’s important to provide a logo or title on each page of the site to help make sure users always know where they are. This is very important because it’s easy to click on a link that leads a user to an entirely different Web site without the user's knowledge.
  406.  
  407. Web site interfaces also should provide a sense of where the user is within the site. Have you ever stopped to use a directory at a shopping mall or amusement park? After you find where you want to go, what’s the next thing you look for? Where you are! You look for that little star or dot labeled "You Are Here." What good is a map if you don’t know where you are in relation to everything else on it? Users have the same need when working their way through Web sites. They want to know where they are.
  408.  
  409. With Web sites that use linear or reciprocal navigation, such as online tutorials, users usually want to know a number of things. They want to know how long an application will take to complete (how many pages there are), how far along they are, and how many pages are left for them to see. Giving this guidance is rather easy. Notice how Advanced Academics’ ROADS interface provides a "Page x of 2" cue that tells you exactly where you are within a lesson. Cues like this keep viewers grounded. It also helps them complete the process by letting them see their progress.
  410.  
  411.  
  412. There are several ways you can show cues of users’ progress. The progress tracker below uses bubbles to mark frames or pages. The green bubble (the next to last one in the progress tracker) shows the user’s location within the site. As you can see, the user has one more frame to see before he reaches the end of the line of Web pages.
  413.  
  414.  
  415. Web site visitors must be able to see their navigation options right away. They also must be able to find their way around a Web site. Navigation should be intuitive. Navigation elements such as buttons, text links, drop-down menus, and tabbed menus make it easy for visitors to find their way around. Once at the Web site, where users go next is defined by the site’s information structure. There are five types of structures: linear, reciprocal, sequential, hierarchical, and Web. In simple information structures, like the ones that use linear or reciprocal navigation systems, users can’t get lost. However, users need a sense of context to know where they are in relation to the application as a whole. It’s important to make sure users always know where they are. Designers do that by using various types of visual cues. These can be progress trackers that use bubbles or page numbers to mark which page of how many pages the user is viewing. It is the designer’s job to give navigation and context on a Web site.
  416.  
  417.  
  418.  
  419. Question Number 1 Points: 5.00/5.00
  420. Question Text
  421. Which of the following is the amount of space available on a screen to display information?
  422. Your Answer
  423. C. Screen real-estate
  424. Question Number 2 Points: 5.00/5.00
  425. Question Text
  426. Which of the following should interfaces include to lead users where they want to go?
  427. Your Answer
  428. D. Visual cues
  429. Question Number 3 Points: 5.00/5.00
  430. Question Text
  431. Which type of navigation only involves forward motion?
  432. Your Answer
  433. B. Linear
  434. Question Number 4 Points: 5.00/5.00
  435. Question Text
  436. Which of the following is a way to organize information that has multiple levels?
  437. Your Answer
  438. B. Drop-down menus
  439. Question Number 5 Points: 5.00/5.00
  440. Question Text
  441. Which of the following is a great way to save screen space when information on a site can be broken up into clearly defined categories?
  442. Your Answer
  443. D. Tabbed menus
  444.  
  445. Designers must keep in mind a number of things when designing an interface that users will access across the Internet.
  446.  
  447. Why Interface Design Differs for Internet Versus Local Access
  448. Interactive applications or Web sites hosted on the Internet differ from applications that are hosted on a CD-ROM, hard drive, or local server. The most important difference is that designers have less power over interfaces that are hosted online. They can’t control what kind of computers the users may have. They can’t see what programs users are running. Designers have to create Web-based interfaces flexible enough to be used by many users and computers in a variety of environments. However, there are other reasons to think about these elements.
  449.  
  450. Information from a local hard drive or a CD-ROM on a user's computer responds very quickly. When a user works with an interactive application or Web page from across the Internet, however, the interaction can be affected by the Internet itself. When the application or content must first travel through the Internet, the download time will increase. Think about these factors when designing Web-based interfaces.
  451.  
  452.  
  453. Seven Things Designers Must Consider When Designing for the Web
  454. Designers can’t just think about the different ways a site may be accessed. They also must think about the design itself. There are seven specific things to think about. They are listed in the graphic to the right. The graphic summarizes the seven key principles you must keep in mind when designing interfaces for use on the Web.
  455.  
  456. Notice that many of these are the same as those for designing any other type of interface. These seven items are an ideal checklist to keep handy when designing various interfaces, regardless of access method.
  457.  
  458. Relevance of Content
  459. For content to be relevant, designers must make sure all content and design elements included on the Web site meet the following adjectives:
  460.  
  461. Necessary
  462. Non-distracting
  463. Organized
  464. Accessible
  465. Get rid of content you don’t need
  466. . A good way to judge if an element is needed is to take it away. Then see if the site still works well without it. If the element is unnecessary or redundant, get rid of it.
  467.  
  468. Avoid distractions
  469. . Avoid distracting online visitors with animated GIFs, blinking or scrolling text, or sound files. These files take extra time to download. They also snatch viewers’ attention away from what’s really important—the content of the Web site.
  470.  
  471. Organize content
  472. . Be certain the content included on the Web site is organized and easy to find and read.
  473.  
  474. Make content accessible.
  475. Make certain viewers can find the source of the information on the Web site easily. This way, if they want to contact you, they can. Have a link to your e-mail address or at least to the home page on every page of the Web site.
  476.  
  477.  
  478. Ease of Navigation
  479. For a Web site to be easy to navigate, its design should be simple and intuitive. Designers need to make sure the navigation structure reflects the information on the site and is clearly organized. For easy navigation, designers must build so users can do the following things:
  480.  
  481. Get to places easily
  482. Determine which elements are clickable and which are not
  483. Locate navigation controls easily
  484. Understand menu options dependent upon how they are labeled
  485. Access the home page quickly
  486. Use reliable internal links
  487. Remain within the site easily
  488. Identify the current Web site quickly
  489. Make it easy to get places
  490. Users should be able to tell exactly where they are within an application. They should be able to get anywhere they need to be. They should also be able to find the information they need in the least number of steps or clicks possible.
  491.  
  492. Make it clear which elements are clickable
  493. Clickable items should be obvious. Use highlighted graphics or text. Text links should be blue and/or underlined.
  494.  
  495. Keep navigation controls in view and on every page
  496. Don’t put navigation tools at the bottom of the page unless they are at the top as well. This forces users to scroll down to the bottom of your page to reach them. Keep in mind that you shouldn’t force users to return to the home page after viewing each page of your Web site. Provide navigation tools on every page so they can easily navigate elsewhere.
  497.  
  498. Label menu options clearly
  499. Label links and menu options clearly so users know exactly what to expect when clicking on a link.
  500.  
  501. Provide a link to your homepage on every page
  502. Users who become lost in a Web site have at least been to the home page before. It's a familiar space. Visitors can feel comfortable there. Keep this in mind when designing your Web pages. Visitors may get confused about navigation, or they may be unable to remember where they saw something important. For Web users, this is the equivalent of being lost in the woods. Give your visitors an easy marker to get back to the home page. It’s more likely they will successfully find what they’re looking for if they start over from the beginning. Install a link back to your Web site's home page on every page within the site.
  503.  
  504. Test your links to keep them reliable
  505. Test your links regularly. Be certain to test the site after you’ve uploaded it to the Internet. Don’t test it only from your hard drive.
  506.  
  507. Limit external links to keep your users from getting lost
  508. Limit the number of links that lead to external sites. Your viewers may get lost in cyberspace. Plus, there’s no reason to encourage them to leave your site if you have what they need!
  509.  
  510. Identify yourself
  511. Make it clear to the user just whose Web site they are visiting. Make sure the name of the Web site or the company logo appears on every page.
  512.  
  513. Ease of Navigation
  514. For a Web site to be easy to navigate, its design should be simple and intuitive. Designers need to make sure the navigation structure reflects the information on the site and is clearly organized. For easy navigation, designers must build so users can do the following things:
  515.  
  516. Get to places easily
  517. Determine which elements are clickable and which are not
  518. Locate navigation controls easily
  519. Understand menu options dependent upon how they are labeled
  520. Access the home page quickly
  521. Use reliable internal links
  522. Remain within the site easily
  523. Identify the current Web site quickly
  524. Make it easy to get places
  525. Users should be able to tell exactly where they are within an application. They should be able to get anywhere they need to be. They should also be able to find the information they need in the least number of steps or clicks possible.
  526.  
  527. Make it clear which elements are clickable
  528. Clickable items should be obvious. Use highlighted graphics or text. Text links should be blue and/or underlined.
  529.  
  530. Keep navigation controls in view and on every page
  531. Don’t put navigation tools at the bottom of the page unless they are at the top as well. This forces users to scroll down to the bottom of your page to reach them. Keep in mind that you shouldn’t force users to return to the home page after viewing each page of your Web site. Provide navigation tools on every page so they can easily navigate elsewhere.
  532.  
  533. Label menu options clearly
  534. Label links and menu options clearly so users know exactly what to expect when clicking on a link.
  535.  
  536. Provide a link to your homepage on every page
  537. Users who become lost in a Web site have at least been to the home page before. It's a familiar space. Visitors can feel comfortable there. Keep this in mind when designing your Web pages. Visitors may get confused about navigation, or they may be unable to remember where they saw something important. For Web users, this is the equivalent of being lost in the woods. Give your visitors an easy marker to get back to the home page. It’s more likely they will successfully find what they’re looking for if they start over from the beginning. Install a link back to your Web site's home page on every page within the site.
  538.  
  539. Test your links to keep them reliable
  540. Test your links regularly. Be certain to test the site after you’ve uploaded it to the Internet. Don’t test it only from your hard drive.
  541.  
  542. Limit external links to keep your users from getting lost
  543. Limit the number of links that lead to external sites. Your viewers may get lost in cyberspace. Plus, there’s no reason to encourage them to leave your site if you have what they need!
  544.  
  545. Identify yourself
  546. Make it clear to the user just whose Web site they are visiting. Make sure the name of the Web site or the company logo appears on every page.
  547.  
  548. Length of Download Time
  549. Web site visitors share one common complaint. Web pages take too long to download! When a slow response occurs, users often choose to visit other Web sites and leave the one you designed. When this happens, your visitors may never return. To make sure users are not chased away by slow downloads, designers should take the following steps:
  550.  
  551. Make sure image files are the appropriate size and not oversized
  552. Use thumbnails when multiple images are needed, or when full images are bandwidth intensive
  553. Avoid flashy graphics and multimedia files
  554. Make sure image files are the appropriate size.
  555. Don’t present huge images, graphics, or other files that will take a long time to load. Many people don’t have high-speed Internet or the latest and greatest computers. You should think of these users when designing. The resolution of your images should be no more than 72-100 dpi (dots per inch). They should also be no larger than 20K in size.
  556.  
  557. Use thumbnails when multiple images are needed.
  558. When a page presents several images, use thumbnails. These are small images that usually are linked to larger versions of the original images. Using thumbnails for a page where there are several images (like a photo gallery) reduces the time it takes for the images to load. It gives users the option to preview images then click only on the ones they need. This makes for faster load times overall.
  559.  
  560. Avoid flashy graphics and multimedia files.
  561. Flashy graphics and multimedia files will slow down the Web site’s response time. They also may distract your viewer from the content of your site. Whenever possible, use simple graphics. Use multimedia files only when required. You might also give users the option of accessing a "Flash – high graphics" version or a "text only" version.
  562.  
  563. Compatibility
  564. As previously stated, you cannot control what software and computers a Web site visitor uses when accessing your site. Therefore, you must:
  565.  
  566. Make certain your site can be viewed on all browsers and still appear relatively the same
  567. Make certain your site can be viewed on all platforms
  568. Make certain your site can be viewed on all browsers.
  569. Every browser displays Web sites a little differently. Internet Explorer, Mozilla Firefox, and Apple Safari are common browsers. You should always test your site on each of these browsers and any others your audience may be likely to use. This will let you make sure your Web pages load well on each browser. Many browsers read coding differently. You may need to change your code in order to make it appear correctly.
  570.  
  571. Make sure your site can be viewed on all platforms.
  572. Web sites may load differently on PC computers than they do on Apple computers. Test your Web site on both platforms to make sure it loads and runs well on both.
  573.  
  574.  
  575. Visual Appeal
  576. As much as we’d like to think that looks don’t matter, a visually appealing Web site is vital to holding a visitor’s attention. To make certain you don’t lose visitors to other sites, Web designers should create a design that will meet the following criteria:
  577.  
  578. Keep it simple
  579. Be consistent
  580. Use quality appealing and appropriate graphics
  581. Keep it simple.
  582. The visual appeal of your Web site is key. Visitors often decide in less than a second whether to stay or leave. This judgment is often based on the visual appeal of the site. A clean, organized Web page looks professional and respectable. Avoid clutter and other distracting elements. Simplicity will give viewers a straightforward, distraction-free page to search.
  583.  
  584. Be consistent.
  585. Use one design style, color scheme, layout, and font list throughout the Web site. Use colors that contrast well. Design one layout and use it on each page. Use the same fonts and font sizes on each page.
  586.  
  587. Use quality graphics.
  588. Pay attention to the quality of your graphics. Stretching graphics creates fuzzy images and jagged edges. Web site graphics need to look professional and appealing to keep visitors interested and at your site.
  589.  
  590. Designers have little power or control over what systems and software visitors use to look at Web sites. As a result, Web designers must keep in mind seven specific design concepts. These will help designers to create flexible, Web-based interfaces that can be used by a multitude of visitors regardless of the computing environment. Those seven concepts are:
  591.  
  592. Relevance of the content
  593. Ease of navigation
  594. Consistency of format
  595. Legibility of type
  596. Length of download time
  597. Compatibility
  598. Visual appeal
  599.  
  600.  
  601. Question Number 1 Points: 5.00/5.00
  602. Question Text
  603. What is the most effective way to identify text links?
  604. Your Answer
  605. A. Blue and/or underlined
  606. Question Number 2 Points: 2.00/2.00
  607. Question Text
  608. WYSIWYG-based interfaces tend to confuse users and should be avoided.
  609. Your Answer
  610. False
  611. Question Number 3 Points: 5.00/5.00
  612. Question Text
  613. How do viewers perceive a poorly designed interface?
  614. Your Answer
  615. C. Unprofessional
  616. Question Number 4 Points: 5.00/5.00
  617. Question Text
  618. What is the extension .com an example of?
  619. Your Answer
  620. B. TLD
  621. Question Number 5 Points: 5.00/5.00
  622. Question Text
  623. What is indicated in red in the following Web page address? http://www.google.co.jp
  624. Your Answer
  625. D. Top level domain
  626. Question Number 6 Points: 0.00/5.00
  627. Question Text
  628. Which type of navigation is illustrated?
  629.  
  630.  
  631. Your Answer
  632. A. Hierarchical
  633. Question Number 7 Points: 5.00/5.00
  634. Question Text
  635. Which of the following Web pages is not contained within the site www.website.ext? (Choose all that apply.)
  636. Your Answer
  637. 7508322:C. www.website.link ,7508323:D. www.website.web/web.html
  638. Question Number 8 Points: 5.00/5.00
  639. Question Text
  640. What is the name of the part of the URL highlighted in red in the address below? http://www.advancedacademics.com/about.html
  641. Your Answer
  642. A. Domain name
  643. Question Number 9 Points: 5.00/5.00
  644. Question Text
  645. To which of the following can a hyperlink be used to connect? (Choose all that apply.)
  646. Your Answer
  647. 7508336:A. A JPG file ,7508337:B. A PDF document ,7508338:C. Another location on the same Web page ,7508339:D. Another Web page
  648. Question Number 10 Points: 5.00/5.00
  649. Question Text
  650. Which of the following URL addresses will take the user to the same site as: www.advancedacademics.com?
  651. Your Answer
  652. B. www.advancedacademics.com/index.html
  653. Question Number 11 Points: 5.00/5.00
  654. Question Text
  655. Why should links be tested regularly?
  656. Your Answer
  657. A. To keep them reliable
  658. Question Number 12 Points: 5.00/5.00
  659. Question Text
  660. What does the menu system on your DVD player illustrate?
  661. Your Answer
  662. A. Interface
  663. Question Number 13 Points: 5.00/5.00
  664. Question Text
  665. Which type of navigation is illustrated?
  666.  
  667.  
  668. Your Answer
  669. B. Linear
  670. Question Number 14 Points: 5.00/5.00
  671. Question Text
  672. A design includes too much essential information that the audience already knows. What area of the audience analysis did the designer fail to address?
  673. Your Answer
  674. D. Understanding
  675. Question Number 15 Points: 5.00/5.00
  676. Question Text
  677. What does knowing a user's understanding of technology help a designer to determine?
  678. Your Answer
  679. A. Level of support the interface needs to provide
  680. Question Number 16 Points: 5.00/5.00
  681. Question Text
  682. The acronym AUDIENCE serves to remind you of what to consider when analyzing an audience. The "U" stands for "understanding." How does this play into the audience analysis?
  683. Your Answer
  684. D. The designer needs to consider how much the audience already knows about the content around which the design is centered.
  685. Question Number 17 Points: 5.00/5.00
  686. Question Text
  687. What should a good interface design incorporate?
  688. Your Answer
  689. B. Icons and functionalities that reflect the world in which we live
  690. Question Number 18 Points: 5.00/5.00
  691. Question Text
  692. Which type of navigation is simliar to a book because users can move back and forth between frames?
  693. Your Answer
  694. C. Reciprocal
  695. Question Number 19 Points: 5.00/5.00
  696. Question Text
  697. The acronym AUDIENCE serves to remind you of what to consider when analyzing an audience. In the acronym, what does the "C" stand for?
  698. Your Answer
  699. D. Context
  700. Question Number 20 Points: 2.00/2.00
  701. Question Text
  702. Web navigation gives the user a sense of control.
  703. Your Answer
  704. True
  705. Question Number 21 Points: 5.00/5.00
  706. Question Text
  707. Where should your homepage link be placed?
  708. Your Answer
  709. C. Every page
  710. Question Number 22 Points: 5.00/5.00
  711. Question Text
  712. What's another name for a Web site address?
  713. Your Answer
  714. C. URL
  715. Question Number 23 Points: 2.00/2.00
  716. Question Text
  717. Designers have more power over interfaces that are hosted online than those hosted on a CD-ROM or hard drive.
  718. Your Answer
  719. False
  720. Question Number 24 Points: 2.00/2.00
  721. Question Text
  722. The Internet is a part of the World Wide Web.
  723. Your Answer
  724. False
  725. Question Number 25 Points: 5.00/5.00
  726. Question Text
  727. Which type of navigation is illustrated?
  728.  
  729.  
  730. Your Answer
  731. C. Reciprocal
  732. Question Number 26 Points: 5.00/5.00
  733. Question Text
  734. What is the extension .net an example of?
  735. Your Answer
  736. B. TLD
  737. Question Number 27 Points: 5.00/5.00
  738. Question Text
  739. What type of problem might occur while a designer is assessing an audience's demographics?
  740. Your Answer
  741. D. The designer might jump to conclusions and apply stereotypes to the audience.
  742. Question Number 28 Points: 5.00/5.00
  743. Question Text
  744. How can you judge the relevancy of a design element?
  745. Your Answer
  746. D. Take it away and determine if the site works well without it.
  747. Question Number 29 Points: 5.00/5.00
  748. Question Text
  749. What is the name of the part of the URL highlighted in red in the address below? https://roads.advancedacademics.com/news.html
  750. Your Answer
  751. B. Extension
  752. Question Number 30 Points: 2.00/2.00
  753. Question Text
  754. It's important for designers to make sure clickable items appear clickable when designing Web pages.
  755. Your Answer
  756. True
  757.  
  758. What is HTML?
  759. Have you ever wondered how Web pages are created? Hypertext Markup Language, or HTML for short, is the language used to create content that is shown on the World Wide Web. HTML is used to create Web pages so that people can see the Web page regardless of the computer or browser that they choose to use. Every Web page you see is made up of HTML. As a matter of fact, the Web page you are using right now to view this course content is made up of HTML. HTML is the structure behind the site that you don’t see.
  760.  
  761. Think of a human body system. Without organs like the lungs and heart, a human couldn’t live. The organs keep the person alive. Other parts of the body, such as DNA, determine how the person looks. When you see a person, you don’t see his or her organs or DNA. You only see the person. HTML works in a similar way. HTML code is what makes the Web site work and decides how it looks. When you visit a Web page, you don’t see the HTML code. You just see the page.
  762.  
  763. Let’s take a look at some HTML code. If you click on "View" in the tool bar of your Web browser and select "Source" or "Page Source," you will see the HTML code that builds this Web page.
  764.  
  765.  
  766. How to view the HTML source for a web page in Firefox: View > Page Source
  767.  
  768.  
  769. How to view the HTML source for a web page in Internet Explorer: View > Source
  770.  
  771.  
  772. Writing HTML
  773. All you need to create a Web page using HTML is a text editor like Notepad or TypePad. Notepad comes with almost all versions of Windows. If you’re using a Mac (Macintosh or Apple Computer), you should use TypePad to create HTML. You can use a PC or a Mac to create or view HTML pages. You don’t even have to be online while you write HTML.
  774.  
  775. HTML is made up of tags. Tags are words or abbreviated words closed in brackets. Tags give instructions to the browser. For example, <HTML> is the tag that is used to mark the beginning of a piece of HTML code. Open up one of these text-editor programs. We’ll jump right in and create our first HTML page.
  776.  
  777. Open a text editor program.
  778.  
  779. In Windows you can find Notepad by clicking on your "Start" menu and choosing "All Programs" and "Accessories." On a Mac, open the "Applications" window and choose "TypePad."
  780.  
  781. Create a new document.
  782.  
  783. Usually, text-editor programs will open up with a new document template already loaded. If this isn’t the case for you, simply click "New" under the "File" menu.
  784.  
  785. Type or copy and paste the text below into your new document.
  786.  
  787. You probably won't understand what you're copying into the text editor. Don't worry about that. This is just for practice.
  788.  
  789. <html>
  790.  
  791. <head>
  792.  
  793. <title>Hello World!</title>
  794.  
  795. </head>
  796.  
  797. <body>
  798.  
  799. <h1>Hello World!</h1>
  800.  
  801. <p>This is my first Web page and I have no idea what I'm typing.</p>
  802.  
  803. </body>
  804.  
  805. </html>
  806.  
  807. Save the document by choosing "Save As" in the "File" menu.
  808.  
  809. In the "Save in:" drop-down menu, choose "Desktop."
  810.  
  811. In the "Save as type:" drop-down menu, choose "Hyper Text Markup Language file."
  812.  
  813. If "Hyper Text Markup Language file" is not an available option, choose "All Files."
  814.  
  815. Name the file "index.html" and click "OK."
  816.  
  817.  
  818. Opening HTML Files
  819. Now that you’ve created and saved your first HTML file, you should see the icon for it on your computer desktop. If you double-click the icon, it will open your Web site in an Internet browser. See how easy it is to create a Web page?
  820.  
  821. Screenshot of the simple web page created.
  822.  
  823. Editing HTML Files
  824. What if you want to edit your HTML file? If you double-click the file, it opens in an Internet browser. It does not open in the text editor program you used to create it. You’ll have to open the text editor first if you want to view the file in the text-editor screen. Then, choose "Open" from the "File" menu. Browse to the file that you should have saved on your desktop and click "Open." From there, you can edit the file.
  825.  
  826. HTML Practice Exercise
  827. Navigate to three sites on the Internet and view the source for each site. Identify the opening and closing <html> tags. Also identify the <title> and <body> tags.
  828.  
  829.  
  830. Formatting HTML
  831. When you type HTML code into a text editor, you may be taking care to keep letters within tags lowercase. Capitalization doesn’t really matter when writing HTML code. HTML code is not case sensitive. For example, each of the following sets of code works the same:
  832.  
  833. <p> = <P>
  834.  
  835. <html> = <HTml>
  836.  
  837. <tABle> = <table>
  838.  
  839. Even though your code will work either way, it is a best practice to use all lowercase letters. This makes it easier for you and other people to read your code when looking at the source code in the background.
  840.  
  841. Extra spaces don’t matter either, but it is a best practice to get rid of them. Spaces between letters within a word itself will not let the browser read the command. For example, <ht ml> is not a valid tag.
  842.  
  843. <p > = <p>
  844.  
  845. <b> Bold </b> = <b>Bold</b>
  846.  
  847. <ht ml> ≠ <html>
  848.  
  849.  
  850. HTML Tags
  851. Using a text editing program, open this HTML file. Now take a look at the code in this file. Notice all the brackets: < and >. These sets of brackets and the text within them are called HTML tags. HTML code is made up of tags. Almost all HTML tag sets have an opening tag and a closing tag.
  852.  
  853. Opening Tag < >
  854. Closing Tag </ >
  855. Look at the code again. Can you find any sets of opening and closing tags? You'll notice that the very first line contains an opening tag: <html>. The very last line contains the matching closing tag: </html>. You’ll also see the body tags: <body> and </body>.
  856.  
  857. Now you know how to identify HTML tags. Let's take a close look at each of them and break them down. For the most part, each set of HTML tags has three main parts:
  858.  
  859. Opening Tag
  860. Contents
  861. Closing Tag
  862.  
  863. The abbreviations or words contained within the brackets of each tag stand for the tag’s function or formatting command. For example, "p" is used for a paragraph tag. Inside these tags would be paragraph text. "Table" is used for a table tag. This makes it easy to memorize HTML tags.
  864.  
  865. On the Web page itself, you don’t actually see any of the HTML tags. So in the example above, you wouldn’t actually see the <p> or the </p>. The contents between the opening and closing tags are what you see on the Web page. For this example, you would only see "Paragraph text" on the Web page.
  866.  
  867.  
  868. Structuring HTML Codes
  869. There is another thing you should notice when looking at the HTML code that you just opened. The code for a Web page begins with an <html> tag, an opening tag. The page also ends with a corresponding closing tag, </html>. All HTML pages begin and end with opening and closing <html> tags:
  870.  
  871. <html>
  872.  
  873. </html>
  874.  
  875. This opening HTML tag tells the computer that HTML code is about to begin. At the end of the page, the closing HTML tag tells the computer that the HTML code has ended.
  876.  
  877. The next tag that you would see on an HTML page is head tag, <head>. The head tags means "heading or header." It usually contains the title of the HTML page. As a matter of fact, you'll often find the title tag, <title> and </title>, within the header tags. The <head> tag might also contain comment information. This could be the Web page author’s name and date of creation.
  878.  
  879. <html>
  880.  
  881. <head>
  882.  
  883. <title>My First Web Page</title>
  884.  
  885. </head>
  886.  
  887. </html>
  888.  
  889. Remember, the title of the Web page appears in the title bar of the Internet browser when you’re viewing the page. It also appears in the minimized window when you’ve got the page minimized. The title of the Web page in the html code above is "My First Web Page."
  890.  
  891. Before we go on, look again at the code above. Notice how each line is indented differently. HTML code is often structured this way to make it easier to read. You can see that the head tags are indented to the same point. The other corresponding tags <html> and </html> are indented to the same distance. This makes it easier to see where the header starts and ends.
  892.  
  893.  
  894. Structuring HTML Code, Continued
  895. After the header, the second part of the HTML page is the body. The <body> tags contain everything that you will see on a Web page.
  896.  
  897. <html>
  898.  
  899. <head>
  900.  
  901. <title>My First Web Page</title>
  902.  
  903. </head>
  904.  
  905. <body>
  906.  
  907. Main content of webpage
  908.  
  909. </body>
  910.  
  911. </html>
  912.  
  913.  
  914.  
  915. Question Number 1 Points: 5.00/5.00
  916. Question Text
  917. What are the contents of the following HTML tag set?
  918. <body>Hello.</body>
  919. Your Answer
  920. D. Hello.
  921. Question Number 2 Points: 5.00/5.00
  922. Question Text
  923. What does the following code result in? <B>bold</b>
  924. Your Answer
  925. C. bold
  926. Question Number 3 Points: 5.00/5.00
  927. Question Text
  928. HTML is made up of which of the following?
  929. Your Answer
  930. C. Tags
  931. Question Number 4 Points: 5.00/5.00
  932. Question Text
  933. Which of the following is a closing tag? (Choose all that apply.)
  934. Your Answer
  935. 7508685:B. </b> ,7508686:C. </p>
  936. Question Number 5 Points: 5.00/5.00
  937. Question Text
  938. Which of the following is the language used to create content that is shown on the World Wide Web?
  939. Your Answer
  940. B. HTML
  941. Question Number 6 Points: 5.00/5.00
  942. Question Text
  943. In the HTML tag below, which part is highlighted in red?
  944. <p>paragraph</p>
  945. Your Answer
  946. A. Closing tag
  947. Question Number 7 Points: 5.00/5.00
  948. Question Text
  949. Which of the following is an opening tag? (Choose all that apply.)
  950. Your Answer
  951. 7508680:A. <b>,7508682:C. <html>
  952.  
  953. Heading Tags
  954. You may already know the main HTML structure tags. They are <html>, <head>, <title>, and <body>. Now we’re going to learn about some of the more common tags that are used within the body of an HTML page. First, there are the heading tags. These tags are used to create headings for your Web page.
  955.  
  956. There are six heading tags: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. <h1> is the largest font size. These heading tags get progressively smaller until you reach <h6>. Heading tags also make the text bold. Look at the examples below.
  957.  
  958. <h1>Heading 1</h1> = Heading 1
  959.  
  960. <h2>Heading 2</h2> = Heading 2
  961.  
  962. <h3>Heading 3</h3> = Heading 3
  963.  
  964. <h4>Heading 4</h4> = Heading 4
  965.  
  966. <h5>Heading 5</h5> = Heading 5
  967.  
  968. <h6>Heading 6</h6> = Heading 6
  969.  
  970.  
  971. Paragraph Tag
  972. The paragraph tag <p> is used to create chunks of text, like paragraphs. HTML automatically adds an extra line break between sets of paragraph tags.
  973.  
  974. HTML Code Becomes Results
  975. <p>This is the first
  976. paragraph.</p><p>This is the
  977. second paragraph.</p>
  978.  
  979.  
  980. This is the first paragraph.
  981.  
  982. This is the second paragraph.
  983.  
  984. You don’t have to use heading or paragraph tags to add text to a Web page. You can simply type text within the body of your Web page. It will be displayed on the page.
  985.  
  986. HTML Code Becomes Results
  987. <body>
  988. This is the text that you want to appear on your Web page.
  989.  
  990. It will all appear on one line even if you press the "return" key on your keyboard because there are no formatting tags within the text.
  991. </body>
  992.  
  993.  
  994. This is the text that you want to appear on your Web page. It will all appear on one line even if you press the "return" key on your keyboard because there are no formatting tags within the text.
  995.  
  996.  
  997. Break Tag
  998. What if you wanted two lines of text but you didn’t want the extra line break in between that the paragraph tags create? The break tag <br /> creates a single line break. Sometimes this is written <br>.
  999.  
  1000. HTML Code Becomes Results
  1001. This is the first line of text. <br />This is the second line of text.
  1002.  
  1003.  
  1004. This is the first line of text.
  1005. This is the second line of text.
  1006.  
  1007.  
  1008. Blockquote Tag
  1009. Another way to format text on a Web page is to use the blockquote tag. This tag is used to indent full blocks of text.
  1010.  
  1011. HTML Code Becomes Results
  1012. This paragraph does not use the blockquote tag.
  1013. <blockquote>This paragraph uses the blockquote tag.</blockquote>
  1014.  
  1015.  
  1016. This paragraph does not use the blockquote tag.
  1017.  
  1018. This paragraph uses the blockquote tag.
  1019.  
  1020. Notice how there are no paragraph or break tags used in the example above. The blockquote tag automatically adds a single line break above and below the text inside the tag set.
  1021.  
  1022. You can also use multiple blockquote tags in order to indent a block of text even further. Look at the example below. Always be sure to add an end blockquote tag </blockquote> at the end of the indented text. If you indent using two blockquotes, you should end with two ending </blockquote> tags.
  1023.  
  1024. <blockquote><blockquote>This text will be indented twice as much as if you’d just use one blockquote tag.</blockquote></blockquote>
  1025.  
  1026.  
  1027. Horizontal Rule Tag
  1028. Another common HTML tag is the horizontal rule tag <hr>. This inserts a horizontal line onto the Web page like the one shown above under the "Horizontal Rule Tag" heading. You can change the length of the horizontal line by adding size tags to it such as <hr width=50%>. See an example of this below.
  1029.  
  1030.  
  1031. Comment Tag
  1032. The comment tag is another useful tag. It is used to add text to the HTML document that will not appear on the Web page. Internet browsers completely ignore the contents of a comment tag. You might be wondering why you’d ever want to use a comment tag. The comment tag contains text for people who are reading your code. You can use the comment tag to credit other coders (authors) when you borrow their code. You can also type a comment as to why you used that particular text or code. You can also use the comment tag to insert instructions for other coders who might be using your code.
  1033.  
  1034. The comment tag looks like this: <!-- -->.
  1035.  
  1036. HTML Code Becomes Results
  1037. <body>
  1038. <!--This is where the main content of your web page is.-->
  1039. </body>
  1040.  
  1041.  
  1042. Notice how nothing appears in the Results column in the table above. That’s because there is no actual content in the body of the HTML code since the Internet browser ignores the comment tag.
  1043.  
  1044.  
  1045. Bold and Strong Tags
  1046. There are multiple ways to create bold text using HTML. The bold tag <b> makes text bold (darker). The strong tag <strong> has the same visual effect on text. So what’s the difference? There are computer programs called screen readers that are used to "read" Web pages to Web users who have sight problems. For example, blind people use screen readers to "view" a Web page. The screen reader will read all of the text on the Web page to the viewer. It will also read the descriptions of the images and tables on the page. What does this have to do with bold and strong tags? Well, these programs read text within bold tags with emphasis. Text within strong tags is read loudly. You might choose to use either tag dependent upon how you want the text presented in an audio format.
  1047.  
  1048. HTML Code Becomes Results
  1049. <b>Bold Text</b><br />
  1050. <strong>Strong Text</strong>
  1051.  
  1052.  
  1053. Bold Text
  1054. Strong Text
  1055.  
  1056.  
  1057. Italics and Emphasis Tags
  1058. Just like there are multiple ways to make text bold using HTML, there are also several ways to italicize text. The two most common tags for italicizing text are the italics tag, <i>, and emphasis tag, <em>. The italics tag, <i>, is "read" by a screen reader just like all other text on the screen. The only difference the italics tag makes is a visual one. The emphasis tag, on the other hand, is stressed verbally by the screen reader.
  1059.  
  1060. HTML Code Becomes Results
  1061. <i>Italicized Text</i><br />
  1062. <em>Emphasized Text</em>
  1063.  
  1064.  
  1065. Italicized Text
  1066. Emphasized Text
  1067.  
  1068.  
  1069. Big Tags
  1070. Changing the size of text in HTML is very easy. To make your text one size bigger, you would use the big tag, <big>. Make sure you use an ending </big> tag at the end of the text you want to make bigger.
  1071.  
  1072. HTML Code Becomes Results
  1073. This text is normal size.<br />
  1074. <big>This text is one size bigger.</big><br />
  1075. <big><big>This text is two sizes bigger.</big></big>
  1076.  
  1077.  
  1078. This text is normal size.
  1079. This text is one size bigger.
  1080. This text is two sizes bigger.
  1081.  
  1082.  
  1083. Small Tags
  1084. The small tag <small> works in the same way. It will make your text one size smaller. Note the </small> tags at the end of the coding.
  1085.  
  1086. HTML Code Becomes Results
  1087. This text is normal size.<br />
  1088. <small>This text is one size smaller.</small><br />
  1089. <small><small>This text is two sizes smaller.</small></small>
  1090.  
  1091.  
  1092. This text is normal size.
  1093. This text is one size smaller.
  1094. This text is two sizes smaller.
  1095.  
  1096.  
  1097. Nesting Tags
  1098. Tags can also be used within other tags. Using HTML tags within other tags is called nesting tags. You’ve already seen examples of this. The title tag, <title>, always appears within the head tag, <head>. Similarly, several tags are used within the body tag, <body>. Other examples are shown below.
  1099.  
  1100. HTML Code Becomes Results
  1101. <p>Line 1<br />
  1102. Line 2<br />
  1103. Line 3
  1104. </p>
  1105. <p>
  1106. Line 4<br />
  1107. Line 5<br />
  1108. Line 6
  1109. </p>
  1110.  
  1111.  
  1112. Line 1
  1113. Line 2
  1114. Line 3
  1115. Line 4
  1116. Line 5
  1117. Line 6
  1118.  
  1119. <p><b>Bold Text</b></p>
  1120.  
  1121.  
  1122. Bold Text
  1123.  
  1124. <b><i>Bold and Italicized Text</i></b>
  1125.  
  1126.  
  1127. Bold and Italicized Text
  1128.  
  1129.  
  1130. HTML Tags Practice Exercise
  1131. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  1132.  
  1133. What HTML tag(s) is used to create each of the following?
  1134.  
  1135. 1.
  1136. Bold
  1137.  
  1138. Answer Button
  1139.  
  1140. Answer :
  1141. <b></b>
  1142.  
  1143. 2.
  1144. Large text
  1145.  
  1146. Answer Button
  1147.  
  1148. Answer :
  1149. <big></big>
  1150.  
  1151. 3.
  1152. Emphasis
  1153.  
  1154. Answer Button
  1155.  
  1156. Answer :
  1157. <em></em>
  1158.  
  1159. 4.
  1160. Strong text
  1161.  
  1162. Answer Button
  1163.  
  1164. Answer :
  1165. <strong></strong>
  1166.  
  1167. 5.
  1168. Horizontal rule
  1169.  
  1170. Answer Button
  1171.  
  1172. Answer :
  1173. <hr>
  1174.  
  1175. 6.
  1176. Comment
  1177.  
  1178. Answer Button
  1179.  
  1180. Answer :
  1181. <!-- -->
  1182.  
  1183. 7.
  1184. Largest heading
  1185.  
  1186. Answer Button
  1187.  
  1188. Answer :
  1189. <h1></h1>
  1190.  
  1191. 8.
  1192. Paragraph text
  1193.  
  1194. Answer Button
  1195.  
  1196. Answer :
  1197. <p></p>
  1198.  
  1199. 9.
  1200. Italics
  1201.  
  1202. Answer Button
  1203.  
  1204. Answer :
  1205. <i></i>
  1206.  
  1207. 10.
  1208. Small text
  1209.  
  1210. Answer Button
  1211.  
  1212. Answer :
  1213. <small></small>
  1214.  
  1215. 11.
  1216. Line break
  1217.  
  1218. Answer Button
  1219.  
  1220. Answer :
  1221. <br/>
  1222.  
  1223. 12.
  1224. Indented text
  1225.  
  1226. Answer Button
  1227.  
  1228. Answer :
  1229. <blockquote></blockquote>
  1230.  
  1231. Write the HTML code required to create the following:
  1232.  
  1233. 13.
  1234.  
  1235. How to Write HTML Code
  1236. A Short Tutorial
  1237.  
  1238. Answer Button
  1239.  
  1240. 14.
  1241.  
  1242. HTML Tags
  1243. HTML code is made up of tags. Almost all HTML tag sets have an opening tag and a closing tag. Each tag is made up of a piece of text contained within a set of brackets. For example, <p> and <table> are both examples of HTML tags.
  1244.  
  1245. The abbreviations or words contained within the brackets of each tag represent the tag's function or formatting command. For example, "p" is used for a paragraph tag and "table" is used for a table tag. This makes it easy to memorize HTML tags.
  1246.  
  1247. Answer Button
  1248.  
  1249. Answer :
  1250.  
  1251. <p><b>HTML Tags</b><br />
  1252.  
  1253. HTML code is made up of tags. Almost all HTML tag sets have an opening tag and a closing tag. Each tag is made up of a piece of text contained within a set of brackets. For example, <p> and <table> are both examples of HTML tags. </p>
  1254.  
  1255. <p>The abbreviations or words contained within the brackets of each tag represent the tag's function or formatting command. For example, "p" is used for a paragraph tag and "table" is used for a table tag. This makes it easy to memorize HTML tags. </p>
  1256.  
  1257.  
  1258.  
  1259. Question Number 1 Points: 5.00/5.00
  1260. Question Text
  1261. What does the following HTML result in? <h1>Title</h1>
  1262. Your Answer
  1263. 7508785:D.
  1264. Title
  1265. Question Number 2 Points: 5.00/5.00
  1266. Question Text
  1267. Which of the following pieces of code results in the following? italics
  1268. Your Answer
  1269. 7508814:A. <b>italics</b> ,7508816:C. <strong>italics</strong>
  1270. Question Number 3 Points: 5.00/5.00
  1271. Question Text
  1272. Which of the following is a heading tag?
  1273. Your Answer
  1274. 7508778:A. <h1> ,7508779:B. <h6>
  1275. Question Number 4 Points: 5.00/5.00
  1276. Question Text
  1277. What does the following HTML result in? <body>Paragraph 1<br />Paragraph 2</body>
  1278. Your Answer
  1279. C.
  1280. Question Number 5 Points: 5.00/5.00
  1281. Question Text
  1282. Which of the following tags results in an indented paragraph?
  1283. Your Answer
  1284. A. <blockquote>
  1285. Question Number 6 Points: 5.00/5.00
  1286. Question Text
  1287. What does the following HTML result in?
  1288. <p>Paragraph 1</p><p>Paragraph 2</p>
  1289. Your Answer
  1290. D.
  1291. Question Number 7 Points: 5.00/5.00
  1292. Question Text
  1293. To create text that is one size bigger than normal text, what tag do you use?
  1294. Your Answer
  1295. B. <big>
  1296. Question Number 8 Points: 5.00/5.00
  1297. Question Text
  1298. Which of the following tags is used to create a paragraph?
  1299. Your Answer
  1300. B. <p>
  1301. Question Number 9 Points: 5.00/5.00
  1302. Question Text
  1303. Which of the following tags results in a horizontal rule?
  1304. Your Answer
  1305. A. <hr>
  1306. Question Number 10 Points: 5.00/5.00
  1307. Question Text
  1308. What does the following code result in?
  1309. <body>ABC<br />
  1310. <!--12345-->DEFG
  1311. </body>
  1312. Your Answer
  1313. D.
  1314.  
  1315. Question Number 11 Points: 5.00/5.00
  1316. Question Text
  1317. What does the following HTML result in? <body>Paragraph 1
  1318. Paragraph 2</body>
  1319. Your Answer
  1320. A. Paragraph 1 Paragraph 2
  1321. Question Number 12 Points: 5.00/5.00
  1322. Question Text
  1323. Which of the following is the HTML tag for a comment?
  1324. Your Answer
  1325. A. <!-- -->
  1326. Question Number 13 Points: 5.00/5.00
  1327. Question Text
  1328. Which of the following tags is used to create a line break?
  1329. Your Answer
  1330. A. <br />
  1331. Question Number 14 Points: 5.00/5.00
  1332. Question Text
  1333. Which of the following pieces of code results in the following? bold words
  1334. Your Answer
  1335. 7508810:A. <b>bold words</b> ,7508813:D. <strong>bold words</strong>
  1336. Question Number 15 Points: 5.00/5.00
  1337. Question Text
  1338. To create text that is one size smaller than normal text, what tag do you use?
  1339. Your Answer
  1340. D. <small>
  1341.  
  1342. HTML tags let you insert various sizes of text, format paragraphs, add horizontal lines, and complete a variety of other tasks. To create a well-designed Web site, you need to have control over the elements that you add. For example, what if you want to add a color to the background of your Web page? Or you want to align your text to the right?
  1343.  
  1344. Attributes are used to define HTML tags. For example, to change the background color of a Web page, you would use the bgcolor attribute within the body tag. The bgcolor attribute in the body tag below tells the browser to display the background in the color 000000. This is the code for black.
  1345.  
  1346. <body bgcolor="#000000">
  1347.  
  1348. In the example above, "bgcolor" is called the attribute and "#000000" is the called value. Every attribute has a value. The value is the definition of the characteristic that the attribute calls for.
  1349.  
  1350. You can also use an attribute to display an image as the background of a Web page. In the example below, "background" is the attribute.
  1351.  
  1352. <body background="dots.gif">
  1353.  
  1354. In HTML all colors are defined by color values from #000000 (black) to #FFFFFF (white). Click here to download a document with the web colors and their values.
  1355.  
  1356. Most tags don’t require attributes. For instance, <body> works just fine. But some tags do require attributes. For example, the image tag by itself, <img />, doesn't mean anything because it doesn't have any attributes. The following image tag, on the other hand, contains an attribute that tells the source of the image. It directs the computer to the location where the image is stored. In the example below, "src" is the attribute.
  1357.  
  1358. <img src="/images/box.jpg" /> (This tag tells the computer that the box image is in a subdirectory called "images" in the current directory)
  1359.  
  1360. Each tag can contain as many attributes as needed. In the image tag below, there are several examples of multiple attributes.
  1361.  
  1362. <img src="images/box.jpg" originalAttribute="src" originalPath="images/box.jpg" border="0" width="550" height="220" alt="Picture of a box" />
  1363.  
  1364.  
  1365. Hyperlinks
  1366. Hyperlinks are the most common uses of attributes. The anchor tag is: <a>. To define a link, you must use the hypertext reference, or href, attribute within the anchor tag. There is then an end anchor </a> tag at the end of the link reference. See how the page name falls between the quotation marks and then brackets. Everything between > and the next < is what you will see as the title of that link in the results area.
  1367.  
  1368. HTML Code Results
  1369. <a href="link.html" originalAttribute="href" originalPath="link.html">This text links to link.html.</a>
  1370.  
  1371.  
  1372. This text links to link.html.
  1373. You can also link images by closing the image tag with the anchor tag. Look at the following example.
  1374.  
  1375. HTML Code Results
  1376. <a href="link.html"><img originalAttribute="href" originalPath="link.html"><img src="fish.gif"></a>
  1377.  
  1378.  
  1379. Fish
  1380.  
  1381. Hyperlinks Practice Exercise
  1382. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  1383.  
  1384. For each of the following, identify what is being linked and to what it is being linked. The first one is answered for you as an example.
  1385.  
  1386. <a href="video.html">Video</a>
  1387.  
  1388. Show Answer
  1389. The text "Video" is being linked to the Web page "video.html."
  1390. <a href="application.pdf"><img src="download.gif"></a>
  1391.  
  1392. Show Answer
  1393. The image "download.gif" is being linked to the .pdf document "application.pdf."
  1394. <a href="resume.doc"><img src="resume_button.gif"></a>
  1395.  
  1396. Show Answer
  1397. The image "resume_button.gif" is being linked to the Web page "resume.doc."
  1398. <a href="audio.wav">Play soundtrack</a>
  1399.  
  1400. Show Answer
  1401. The text "Play soundtrack" is being linked to the file "audio.wav."
  1402. <a href="booklist.html"><img src="bookbutton.gif"></a>
  1403.  
  1404. Show Answer
  1405. The image "bookbutton.gif" is being linked to the Web page "booklist.html."
  1406.  
  1407.  
  1408.  
  1409. Question Number 1 Points: 2.00/2.00
  1410. Question Text
  1411. A tag can only have one attribute.
  1412. Your Answer
  1413. False
  1414. Question Number 2 Points: 5.00/5.00
  1415. Question Text
  1416. What is the definition of the characteristic that the attribute is calling for?
  1417. Your Answer
  1418. D. Value
  1419. Question Number 3 Points: 5.00/5.00
  1420. Question Text
  1421. Which of the following are used to define characteristics of HTML tags?
  1422. Your Answer
  1423. A. Attributes
  1424. Question Number 4 Points: 5.00/5.00
  1425. Question Text
  1426. In the tag below, what part is highlighted in red?
  1427.  
  1428. <body bgcolor="#000000">
  1429. Your Answer
  1430. D. Value
  1431. Question Number 5 Points: 5.00/5.00
  1432. Question Text
  1433. Which of the following would you use to define the background color of a table in a Web page?
  1434. Your Answer
  1435. A. Attribute
  1436. Question Number 6 Points: 5.00/5.00
  1437. Question Text
  1438. In the HTML code below, identify the attributes.
  1439.  
  1440. <a href="link.html" originalAttribute="href" originalPath="link.html" target="new window">
  1441. Your Answer
  1442. 7508914:B. href ,7508916:D. target
  1443. Question Number 7 Points: 3.33/5.00
  1444. Question Text
  1445. In the HTML code below, identify the attributes.
  1446.  
  1447. <img src=“/images/box.jpg” originalAttribute="src" originalPath="“/images/box.jpg”" border=“0” width=“550” height=“220” alt=“Picture of a box” />
  1448. Your Answer
  1449. 7508909:A. alt ,7508910:B. border ,7508911:C. img ,7508912:D. src
  1450.  
  1451. Ordered Lists
  1452. Using HTML, creating ordered or numbered lists is quite easy. The ordered list tag is <ol>. This is easy to remember because the "o" stands for "ordered" and the "l" stands for "list." Each item you want in your list uses the line item (or list item) tag <li>. The "l" stands for line and the "i" for item. Look at the example code below:
  1453.  
  1454. HTML Code Results
  1455. <ol>
  1456. <li>Line 1</li>
  1457. <li>Line 2</li>
  1458. <li>Line 3</li>
  1459. </ol>
  1460.  
  1461.  
  1462. Line 1
  1463. Line 2
  1464. Line 3
  1465. The <ol> and <li> will automatically use numbers starting with the number 1 by default. What do you do if you want your ordered list to use letters instead of numbers? This is where you would use attributes. Look at the following example.
  1466.  
  1467. HTML Code Results
  1468. <ol type=1>
  1469. <li>Line 1</li>
  1470. <li>Line 2</li>
  1471. <li>Line 3</li>
  1472. </ol>
  1473.  
  1474.  
  1475. Line 1
  1476. Line 2
  1477. Line 3
  1478. <ol type=A>
  1479. <li>Line 1</li>
  1480. <li>Line 2</li>
  1481. <li>Line 3</li>
  1482. </ol>
  1483.  
  1484.  
  1485. Line 1
  1486. Line 2
  1487. Line 3
  1488. <ol type=a>
  1489. <li>Line 1</li>
  1490. <li>Line 2</li>
  1491. <li>Line 3</li>
  1492. </ol>
  1493.  
  1494.  
  1495. Line 1
  1496. Line 2
  1497. Line 3
  1498. <ol type=I>
  1499. <li>Line 1</li>
  1500. <li>Line 2</li>
  1501. <li>Line 3</li>
  1502. </ol>
  1503.  
  1504.  
  1505. Line 1
  1506. Line 2
  1507. Line 3
  1508. <ol type=i>
  1509. <li>Line 1</li>
  1510. <li>Line 2</li>
  1511. <li>Line 3</li>
  1512. </ol>
  1513.  
  1514.  
  1515. Line 1
  1516. Line 2
  1517. Line 3
  1518. Notice how the letters are either capitalized or lowercased depending on the attribute tag.
  1519.  
  1520.  
  1521. Unordered Lists
  1522. Creating unordered lists, or bulleted lists, in HTML is very similar to creating ordered lists. To create an unordered list, you just use the unordered list tag <ul>. The "u" stands for "unordered" and "l" for "list." You use list item tags as you used in the ordered lists.
  1523.  
  1524. HTML Code Results
  1525. <ul>
  1526. <li>Line 1</li>
  1527. <li>Line 2</li>
  1528. <li>Line 3</li>
  1529. </ul>
  1530.  
  1531.  
  1532. Line 1
  1533. Line 2
  1534. Line 3
  1535. Unordered lists can use three different bullet types. They are discs, circles, and squares. The disc is always used by default if no bullet type is specified. Bullet types are defined using the type attribute.
  1536.  
  1537. HTML Code Results
  1538. <ul type=disc>
  1539. <li>Line 1</li>
  1540. <li>Line 2</li>
  1541. <li>Line 3</li>
  1542. </ul>
  1543.  
  1544.  
  1545. Line 1
  1546. Line 2
  1547. Line 3
  1548. <ul type=circle>
  1549. <li>Line 1</li>
  1550. <li>Line 2</li>
  1551. <li>Line 3</li>
  1552. </ul>
  1553.  
  1554.  
  1555. Line 1
  1556. Line 2
  1557. Line 3
  1558. <ul type=square>
  1559. <li>Line 1</li>
  1560. <li>Line 2</li>
  1561. <li>Line 3</li>
  1562. </ul>
  1563.  
  1564.  
  1565. Line 1
  1566. Line 2
  1567. Line 3
  1568. Think of using a bullet key on your word processing program. Each time you indent the bulleted list, the bullet changes from solid to clear, to diamonds, etc. The same thing will happen if you use ordered or unordered lists in a nested format.
  1569.  
  1570.  
  1571. Tables are usually used to organize information on Web pages. The opening HTML tag for a table is <table>. There are several tags used within the table tag set. For example, there are tags used to create rows and columns. The table row tag, <tr> (“t” for table, “r” for row), is used to create a row. Within each table row tag, table data tags, <td> (“t” for table, and “d” for data), are used to create individual cells.
  1572.  
  1573. HTML Code Results
  1574. <table>
  1575. <tr>
  1576. <td>Cell 1</td>
  1577. <td>Cell 2</td>
  1578. <td>Cell 3</td>
  1579. </tr>
  1580. <tr>
  1581. <td>Cell 4</td>
  1582. <td>Cell 5</td>
  1583. <td>Cell 6</td>
  1584. </tr>
  1585. </table>
  1586.  
  1587. Cell 1 Cell 2 Cell 3
  1588. Cell 4 Cell 5 Cell 6
  1589.  
  1590. Table Headings
  1591. Most tables have table headings of some sort. For example, the table we just looked at in the last practice activity has a row of headings at the top.
  1592.  
  1593. Task Assigned To Deadline Completion Date
  1594. Planning Meeting Jacob, Lily, Matt, Jeff May 1 May 1
  1595. Write Proposal Jacob May 6 May 3
  1596. Attend Interview Lily and Matt June 18
  1597. To create headings, you can use the table data tags, <td>. You can also use bold tags, <b>, nested within the <td> tag.
  1598.  
  1599. <tr>
  1600.  
  1601. <td><b>Task</b></td>
  1602.  
  1603. <td><b>Assigned To</b></td>
  1604.  
  1605. <td><b>Deadline</b></td>
  1606.  
  1607. <td><b>Completion Date</b></td>
  1608.  
  1609. </tr>
  1610.  
  1611. It is best to use table header tags, <th>. Table header tags create data cells that are automatically formatted as headers. You don’t have to use the bold tag, <b>.
  1612.  
  1613. <tr>
  1614.  
  1615. <th>Task</th>
  1616.  
  1617. <th>Assigned To</th>
  1618.  
  1619. <th>Deadline</th>
  1620.  
  1621. <th>Completion Date</th>
  1622.  
  1623. </tr>
  1624.  
  1625.  
  1626. Table Practice Activity
  1627. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  1628.  
  1629. Study the table below. The HTML code to build the table follows. Fill in the blanks with the correct beginning and ending tags needed to format it as the table below shows. Notice that there is a new word string at the bottom. "&npsp" means "non-blank space." The "&" at the beginning identifies it as a command. The ";" at the end ends the command. "&nbsp;" is used when you want to add a space between something that might otherwise run together in the text.
  1630.  
  1631. Task Assigned To Deadline Completion Date
  1632. Planning Meeting Jacob, Lily, Matt, Jeff May 1 May 1
  1633. Write Proposal Jacob May 6 May 3
  1634. Attend Interview Lily and Matt June 18
  1635. <html>
  1636.  
  1637. <head>
  1638.  
  1639. <title>Task Schedule</title>
  1640.  
  1641. </head>
  1642.  
  1643. <body>
  1644.  
  1645. <table>
  1646.  
  1647. <tr>
  1648.  
  1649. _____Task_____
  1650.  
  1651. <th>Assigned To</th>
  1652.  
  1653. <th>_____</th>
  1654.  
  1655. _____Completion Date_____
  1656.  
  1657. _____
  1658.  
  1659. _____
  1660.  
  1661. <td>Planning Meeting</td>
  1662.  
  1663. <td>Jacob, Lily, Matt, Jeff</td>
  1664.  
  1665. _____May 1_____
  1666.  
  1667. <td>May 1</td>
  1668.  
  1669. </tr>
  1670.  
  1671. <tr>
  1672.  
  1673. <td>_____</td>
  1674.  
  1675. _____Jacob_____
  1676.  
  1677. <td>May 6</td>
  1678.  
  1679. _____May 3_____
  1680.  
  1681. _____
  1682.  
  1683. <tr>
  1684.  
  1685. <td>Attend Interview_____
  1686.  
  1687. _____Lily and Matt</td>
  1688.  
  1689. <td>June 18_____
  1690.  
  1691. <td>&nbsp;</td>
  1692.  
  1693. </tr>
  1694.  
  1695. _____
  1696.  
  1697. </body>
  1698.  
  1699. </html>
  1700.  
  1701. Answer Button
  1702.  
  1703.  
  1704. Table Attributes
  1705. Attributes can be used on tables to further define the table characteristics. These can be alignment, width, or border width. The table below outlines the most common attributes used in tables.
  1706.  
  1707. Attribute Description Code Results
  1708. align =
  1709.  
  1710. Defines the horizontal alignment of elements
  1711.  
  1712. <table align=center>
  1713.  
  1714. <tr><td>One</td></tr>
  1715.  
  1716. <tr><td>Two</td></tr>
  1717.  
  1718. </table>
  1719.  
  1720. Elements placed above each other at center.
  1721.  
  1722. border =
  1723.  
  1724. Defines the width of the border
  1725.  
  1726. <table border=3>
  1727.  
  1728. <tr><td>One</td></tr>
  1729.  
  1730. <tr><td>Two</td></tr>
  1731.  
  1732. </table>
  1733.  
  1734. Elements with a visible border.
  1735.  
  1736. width =
  1737.  
  1738. Defines the width of the table
  1739.  
  1740. <table width="72">
  1741.  
  1742. <tr><td>One</td></tr>
  1743.  
  1744. <tr><td>Two</td></tr>
  1745.  
  1746. </table>
  1747.  
  1748. Elements in a cell that is expanded to the right of the word.
  1749.  
  1750. cellspacing =
  1751.  
  1752. Specifies how much space (measured in pixels) there should be between the cells in the table
  1753.  
  1754. <table border=1 cellspacing=10>
  1755.  
  1756. <tr><td>One</td><td>Two</td></tr>
  1757.  
  1758. <tr><td>Three</td><td>Four</td></tr>
  1759.  
  1760. </table>
  1761.  
  1762. Table cell elements with visible space between them.
  1763.  
  1764. cellpadding =
  1765.  
  1766. Specifies how much space (measured in pixels) there should be between the contents of the cell and its border
  1767.  
  1768. <table border=1 cellpadding=10>
  1769.  
  1770. <tr><td>One</td><td>Two</td></tr>
  1771.  
  1772. <tr><td>Three</td><td>Four</td></tr>
  1773.  
  1774. </table>
  1775.  
  1776. Elements in cells with visible space between the content and border.
  1777.  
  1778.  
  1779. You are now familiar with HTML tags. HTML also uses something called entitites. Entities are used in HTML for things such as spaces, signs, and symbols. The table below summarizes some of the most common entities used in HTML.
  1780.  
  1781. HTML Entity
  1782.  
  1783. Resulting Output
  1784.  
  1785. Description
  1786.  
  1787. &nbsp;
  1788.  
  1789. Non-breaking space
  1790.  
  1791. &deg;
  1792.  
  1793. °
  1794. Degree sign
  1795.  
  1796. &divide;
  1797.  
  1798. ÷
  1799. Division sign
  1800.  
  1801. &ang;
  1802.  
  1803. Angle sign
  1804.  
  1805. &Delta;
  1806.  
  1807. Δ
  1808. Delta sign
  1809.  
  1810. &asymp;
  1811.  
  1812. Approximately equal to
  1813. Approximation sign
  1814.  
  1815. &ne;
  1816.  
  1817. Not equal to sign
  1818.  
  1819. &radic;
  1820.  
  1821. v
  1822. Radical sign
  1823.  
  1824. &ge;
  1825.  
  1826. Greater than equal to
  1827.  
  1828. &le;
  1829.  
  1830. Less than or equal to
  1831.  
  1832.  
  1833. Non-breaking Space (&nbsp;)
  1834. Line spaces that you insert into your HTML code using the return key on your keyboard don't show up on your Web page. To create a line break on your Web page, you have to use a break tag. Similarly, extra spaces added into your HTML code using the spacebar on your keyboard don't show up on the Web page. You could use the tab key all day long and the text would still be run together.
  1835.  
  1836. HTML Code Becomes Results
  1837. One Two
  1838.  
  1839.  
  1840. One Two
  1841.  
  1842. So what do you do if you want to indent a paragraph five spaces? You have to use the non-breaking space entity, &nbsp;. The letters stand for "non" "blank" "space." Note how the five &nbsp; below create five spaces between the words "One" and "Two."
  1843.  
  1844. HTML Code Becomes Results
  1845. One &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Two
  1846.  
  1847.  
  1848. One Two
  1849.  
  1850.  
  1851.  
  1852. Using Entities in Mathematical and Scientific Documents
  1853. A lot of people who write documents that use mathematical or scientific symbols use entities a lot. For instance, you might use &deg; a lot. If you're taking a calculus course, perhaps you would use &Delta; or &Theta.Note how these are "capitalized." If they were small letters, they would not give the right symbol.
  1854.  
  1855. Entities Practice Exercise
  1856. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  1857.  
  1858. Translate the following pieces of HTML code into text.
  1859.  
  1860. 1.
  1861.  
  1862. &ang;A = &ang;B
  1863.  
  1864. Answer Button
  1865. 2.
  1866.  
  1867. x &ge; 52
  1868.  
  1869. Answer Button
  1870. 3.
  1871.  
  1872. 12 &divide; 2 = 6
  1873.  
  1874. Answer Button
  1875. 4.
  1876.  
  1877. 12 &divide; 5 &asymp; 2
  1878.  
  1879. Answer Button
  1880. 5.
  1881.  
  1882. 50&deg;
  1883.  
  1884. Answer Button
  1885. 6.
  1886.  
  1887. 15 &ne; 23
  1888.  
  1889. Answer Button
  1890. 7.
  1891.  
  1892. Answer:
  1893. &Delta;ABC
  1894.  
  1895. Answer Button
  1896. 8.
  1897.  
  1898. ABC&nbsp;DEF
  1899.  
  1900. Answer Button
  1901. 9.
  1902.  
  1903. Answer:
  1904. 11 &le; 48
  1905.  
  1906. Answer Button
  1907. 10.
  1908.  
  1909. &radic;64 = 8
  1910.  
  1911. Answer Button
  1912.  
  1913. Question Number 1 Points: 5.00/5.00
  1914. Question Text
  1915. In which of the following does the HTML code result?
  1916.  
  1917. <ul type=disc>
  1918. <li>Line 1</li>
  1919. <li>Line 2</li>
  1920. <li>Line 3</li>
  1921. </ul>
  1922. Your Answer
  1923. C.
  1924. • Line 1
  1925. • Line 2
  1926. • Line 3
  1927. Question Number 2 Points: 5.00/5.00
  1928. Question Text
  1929. In which of the following does the HTML code result?
  1930.  
  1931. <ul type=circle>
  1932. <li>Line 1</li>
  1933. <li>Line 2</li>
  1934. <li>Line 3</li>
  1935. </ul>
  1936. Your Answer
  1937. D.
  1938. o Line 1
  1939. o Line 2
  1940. o Line 3
  1941. Question Number 3 Points: 5.00/5.00
  1942. Question Text
  1943. In which of the following does the HTML code result?
  1944.  
  1945. <ol type=1>
  1946. <li>Line 1</li>
  1947. <li>Line 2</li>
  1948. <li>Line 3</li>
  1949. </ol>
  1950. Your Answer
  1951. A.
  1952.  
  1953.  
  1954. Question Number 4 Points: 5.00/5.00
  1955. Question Text
  1956. Which of the following HTML entities will create a degree sign?
  1957. Your Answer
  1958. B. &deg;
  1959. Question Number 5 Points: 5.00/5.00
  1960. Question Text
  1961. In which of the following does the HTML code result?
  1962.  
  1963. <ol type=I>
  1964. <li>Line 1</li>
  1965. <li>Line 2</li>
  1966. <li>Line 3</li>
  1967. </ol>
  1968. Your Answer
  1969. C.
  1970. I. Line 1
  1971. II. Line 2
  1972. III. Line 3
  1973. Question Number 6 Points: 5.00/5.00
  1974. Question Text
  1975. Which of the following is the HTML entity for a nonbreaking space?
  1976. Your Answer
  1977. D. &nbsp;
  1978. Question Number 7 Points: 5.00/5.00
  1979. Question Text
  1980. Which of the following tags creates a row in an HTML table?
  1981. Your Answer
  1982. D. <tr>
  1983. Question Number 8 Points: 0.00/5.00
  1984. Question Text
  1985. How many columns does this table have?
  1986. <table>
  1987. <tr>
  1988. <td>Cell 1</td>
  1989. <td>Cell 2</td>
  1990. <td>Cell 3</td>
  1991. <td>Cell 4</td>
  1992. </tr>
  1993. <tr>
  1994. <td>Cell 5</td>
  1995. <td>Cell 6</td>
  1996. <td>Cell 7</td>
  1997. <td>Cell 8</td>
  1998. </tr>
  1999. </table>
  2000. Your Answer
  2001. A. 2
  2002. Question Number 9 Points: 0.00/5.00
  2003. Question Text
  2004. Which of the following tags automatically formats a new cell in bold in an HTML table?
  2005. Your Answer
  2006. B. <td>
  2007. Question Number 10 Points: 5.00/5.00
  2008. Question Text
  2009. Which of the following tags creates a new cell in an HTML table?
  2010. Your Answer
  2011. C. <td>
  2012. Question Number 11 Points: 5.00/5.00
  2013. Question Text
  2014. What is a piece of HTML code used to create a space, sign, or symbol?
  2015. Your Answer
  2016. C. Entity
  2017. Question Number 12 Points: 5.00/5.00
  2018. Question Text
  2019. In which of the following does the HTML code result?
  2020.  
  2021. <ol type=a>
  2022. <li>Line 1</li>
  2023. <li>Line 2</li>
  2024. <li>Line 3</li>
  2025. </ol>
  2026. Your Answer
  2027. B.
  2028.  
  2029. Cascading Style Sheets (CSS)
  2030. Cascading Style Sheets, or CSS as it is more commonly called, is a language used to define the style and format of an HTML page. CSS can be used to define colors, sizes, fonts, and layout of various elements on a web page. For example, you can define your headings to be font style Arial, size 4, bold, and navy blue. Then, you can define your paragraph text to be font style Calibri, size 2, and black. You can define captions to be font style Arial, size 1, and black and so forth. If you have such definitions in your CSS file, your HTML files can simply call for a section of font to be a heading, paragraph, or caption, rather than having to define the font style at every occurrence.
  2031.  
  2032. CSS files are created and saved separately from the HTML files that make up a Web site. They are saved with the extension .css and can be referenced by any number of HTML files. For example, if you have a Web site that contains five HTML files, you can create one CSS file that defines the style and format of all five HTML files.
  2033.  
  2034. Using CSS allows Web designers to separate the design elements of a Web page from the page’s content. Taking all style and formatting code out of the HTML pages allow the pages to load more quickly because there is less information in the file for the browser to read. Using CSS also helps create consistency in and control of the visual design of a single Web page or an entire site.
  2035.  
  2036.  
  2037. The Structure of CSS
  2038. CSS is made up of rules. A rule is a statement that defines a style or format for a defined element in a Web page.
  2039.  
  2040. Each rule has three parts:
  2041.  
  2042. Selector—The part of the Web page that will be affected by the rule
  2043. Property—The element whose style and/or format is being defined
  2044. Value—The definition, or description, of the property being defined
  2045. Let’s look at an example rule and identify the three parts:
  2046.  
  2047. body {
  2048.  
  2049. color:#ffffff;
  2050.  
  2051. }
  2052.  
  2053. Selector
  2054. In the example above, the selector is “body.” This defines the area of the Web page that will be affected by the rule.
  2055.  
  2056. Property
  2057. The property is “color,” which defines the color of the text within the body of the Web page.
  2058.  
  2059. Value
  2060. The value is “#ffffff,” which is the HTML code for white.
  2061.  
  2062. Notice that the property and the value are contained within a set of brackets.
  2063.  
  2064. CSS rules can contain more than one property and more than one value. For example, you can define both the font color and background color for the body of a Web page using one CSS rule.
  2065.  
  2066. body {
  2067.  
  2068. color:#ffffff;
  2069.  
  2070. background-color:#525252;
  2071.  
  2072. }
  2073.  
  2074.  
  2075. Creating a CSS File
  2076. Let’s build a CSS file together. To create a CSS file, you have to start with an HTML page. Open a text editor like Notepad (PC) or TypePad (Mac) and copy and paste the code in the box below into your editor.
  2077.  
  2078. <html>
  2079.  
  2080. <head>
  2081.  
  2082. <title>Hello World!</title>
  2083.  
  2084. </head>
  2085.  
  2086. <body>
  2087.  
  2088. <h1>Hello World!</h1>
  2089.  
  2090. <p>This is my first experience with CSS Style Sheets. Woo hoo!</p>
  2091.  
  2092. </body>
  2093.  
  2094. </html>
  2095.  
  2096. Before we get started with CSS, save your HTML file (using the code above) and view it in a browser. You’ll notice that it’s a plain page with a white background and black text.
  2097.  
  2098.  
  2099. <style> Tag
  2100. The first thing you are going to do is create a <style> tag within the head tags of your HTML page. Under the <title> tags, type: <style type=”text/css”>. Your head should now look like this:
  2101.  
  2102. <head>
  2103.  
  2104. <title>Hello World!</title>
  2105.  
  2106. <style type="text/css">
  2107.  
  2108. </head>
  2109.  
  2110. The line you just added tells the browser that the following language is CSS.
  2111.  
  2112. Now, let’s add some content to the <style> tag.
  2113.  
  2114. <style type=”text/css”>
  2115.  
  2116. body {
  2117.  
  2118. color: #ffffff;
  2119.  
  2120. background-color: #525252;
  2121.  
  2122. font-family: Arial, "Lucida Console," sans-serif;
  2123.  
  2124. }
  2125.  
  2126. h1{
  2127.  
  2128. color: #000000;
  2129.  
  2130. font-size: x-large;
  2131.  
  2132. font-family: Georgia, “Times New Roman”, Times, serif;
  2133.  
  2134. </style>
  2135.  
  2136. Can you tell what styles we defined above? The body rule tells us that the text color in the body of the Web page will be #ffffff, or white and the background color will be #525252, or dark gray. It also defines the font style to be Arial. It continues to define fonts in order of preference just in case the computer that’s displaying the site doesn’t have one of the fonts you define installed. This prioritized list ends with “sans-serif,” which tells the computer to display any generic sans-serif font if none of the other fonts are installed.
  2137.  
  2138. We also added a rule for h1, the heading. The heading will be #000000, or black, in color and x-large in size. The font was defined as Georgia, with Times New Roman and Roman assigned as backups.
  2139.  
  2140. Now, save your HTML file and look at it in a browser. Instead of a plain white background with black text, you should now have a gray background with a large black heading in a serif font and white text in a sans-serif font.
  2141.  
  2142.  
  2143. Saving a CSS File
  2144. You are probably wondering why we’re putting CSS directly into our HTML file when I told you earlier that CSS and HTML files were saved separately. The reason we write our CSS code directly in an HTML files is to see the effect of the CSS code in a Web page as it’s being written. Once you’ve finished writing the CSS and your HTML file is formatted the way you want it, it’s time to separate the CSS from the HTML and save the files separately.
  2145.  
  2146. Open the HTML file you just created and copy the following code out of it into a new file:
  2147.  
  2148. body {
  2149.  
  2150. color: #ffffff;
  2151.  
  2152. background-color: #525252;
  2153.  
  2154. font-family: Arial, "Lucida Console," sans-serif;
  2155.  
  2156. }
  2157.  
  2158. h1{
  2159.  
  2160. color: #000000;
  2161.  
  2162. font-size: x-large;
  2163.  
  2164. font-family: Georgia, “Times New Roman”, Times, serif;
  2165. }
  2166.  
  2167. Save this file as: “style.css” into the same location as your HTML file is saved.
  2168.  
  2169. Your HTML file should now have an empty <style> tag:
  2170.  
  2171. <style type=”text/css”>
  2172.  
  2173. </style>
  2174.  
  2175. What you’ll need to do is delete the <style> tag completely and replace it with:
  2176.  
  2177. <link rel=”stylesheet” type=”text/css” href=”style.css” originalAttribute="href" originalPath=”style.css”/>
  2178.  
  2179. The code above links your HTML and CSS files.
  2180.  
  2181. Now save your HTML file.
  2182.  
  2183.  
  2184. Double-check the Code
  2185. The final code for your style.css file should be:
  2186.  
  2187. body {
  2188.  
  2189. color: #ffffff;
  2190.  
  2191. background-color: #525252;
  2192.  
  2193. font-family: Arial, "lucida console," sans-serif;
  2194.  
  2195. }
  2196.  
  2197. h1{
  2198.  
  2199. color: #000000;
  2200.  
  2201. font-size: x-large;
  2202.  
  2203. font-family: Georgia, “Times New Roman”, Times, serif;
  2204. }
  2205.  
  2206. The final code for your HTML file should be:
  2207.  
  2208. <html>
  2209.  
  2210. <head>
  2211.  
  2212. <title>Hello World!</title>
  2213.  
  2214. <link rel=”stylesheet” type=”text/css” href=”style.css” originalAttribute="href" originalPath="style.css” />
  2215.  
  2216. </head>
  2217.  
  2218. <body>
  2219.  
  2220. <h1>Hello World!</h1>
  2221.  
  2222. <p>This is my first experience with CSS Style Sheets. Woo hoo!</p>
  2223.  
  2224. </body>
  2225.  
  2226. </html>
  2227.  
  2228.  
  2229. Practice Exercise
  2230. Open your HTML file. The background of the Web page should be dark gray. “Hello World!” should be in extra large, black, serif font. The rest of the text on the page should be white and sans-serif.
  2231.  
  2232. Change the look of the Web page by editing the CSS file. Do NOT edit the HTML file. If you’d like, you can use the code below to change the background to light blue and the color of the body text to black. The code below will also change the color of the heading to dark blue.
  2233.  
  2234. body {
  2235.  
  2236. color: #000000;
  2237.  
  2238. background-color: #C9E1FF;
  2239.  
  2240. font-family: Arial, "lucida console," sans-serif;
  2241.  
  2242. }
  2243.  
  2244. h1{
  2245.  
  2246. color: #114485;
  2247.  
  2248. font-size: x-large;
  2249.  
  2250. font-family: Georgia, “Times New Roman”, Times, serif;
  2251. }
  2252.  
  2253. After you’ve edited and saved your CSS file, open the HTML file in a browser to see how it’s changed.
  2254.  
  2255. HTML Files
  2256. Web sites are made up of individual Web pages that are linked together. Each Web page is constructed with an HTML file. An HTML file is a text file that contains the code that builds a Web page. For example, if you have a Web site that contains five pages (the home page, a page with your resume, a page with your biography, a page with a photo album, and a page with your contact information), then your site will be made up of five files.
  2257.  
  2258. Icons of Image folder and five named files.
  2259.  
  2260. Index.html
  2261. Notice that one of the HTML files above is named “index.html.” This page is the home page for your Web site. If there is no “index.html” file in the root folder, nothing will be displayed when you navigate to the site address.
  2262.  
  2263. Also notice there is an “images” folder above. This is where all the images for this Web site are stored. This folder can have any name, but typically, it’s named “images.”
  2264.  
  2265. Creating and Storing HTML Files
  2266. You create HTML files on your computer. In order to view those files on the Internet, you have to store them where other computers can access them. If you keep the files on your computer, the files won’t be accessible if you ever turn your computer off. Plus, people will access your computer’s hard drive when they visit your site. This will cause your other computer processes to slow down.
  2267.  
  2268. In order to avoid these complications, upload and store HTML files to an FTP server. An FTP server is a computer connected to the Internet that is used to store files. When a computer from anywhere in the world accesses a Web page, that computer simply reads the file from the FTP server where the HTML file is stored.
  2269.  
  2270. FTP Services
  2271. Where can you find an FTP server on which to store your HTML files? There are several free FTP services out there, such as Google and Yahoo. These free services will allow you a limited amount of space on their FTP servers to store your Web site. Some Internet service providers (ISPs) also provide FTP services along with their Internet packages. Again, ISPs will give you a limited amount of space to use. There are also companies that rent out space on their FTP servers.
  2272.  
  2273.  
  2274. Naming Web Page Files
  2275. Whether you’re naming HTML, CSS, image, or other types of Web page files, there are a set of rules that you should follow in your naming conventions. A naming convention is a format in which you label, or name, your files.
  2276.  
  2277. Naming Convention Rules
  2278. Don’t use blanks in file names.
  2279. Some browsers cannot read file names that contain blanks. This is because the browsers try to read the words on either side of the blanks as separate names or files. It’s best to avoid using blanks in all file names. But this doesn’t mean you have to smash all the words in a file name together. That can make a file name hard to read. For example, it’s difficult to distinguish the two words in the file name: imagelibrary.html.
  2280.  
  2281. There are a couple things you can do to make multi-word file names easier to read. You can use capital letters for the first letter of each word in the file name: ImageLibrary.html. Or you can use an underscore in place of the space: image_library.html.
  2282.  
  2283. Don’t use dots, or periods, in file names.
  2284. You may be tempted to use a dot in place of a space in a file name. Unfortunately, this isn’t a good idea because many browsers read anything following a dot in a file name as the file’s extension. Instead, use an underscore in place of a space.
  2285.  
  2286.  
  2287. Naming Convention Rules (cont’d)
  2288. Abbreviate file names.
  2289. It’s always good to avoid extremely long file names. Long file names don’t necessarily confuse the browser, but can be difficult for users to keep track of. Try to keep your file names abbreviated to avoid unnecessary typos or other confusion.
  2290.  
  2291. Use consistent capitalization in file names.
  2292. Even HTML is not case sensitive. Still, it’s important to maintain consistency in the way files are named. Pay attention to how you use capitalization in your file names. Name files in your Web site in similar fashion. It’s easier to keep track of the following set of images:
  2293.  
  2294. resume.gif
  2295. photos.gif, and
  2296. videos.gif
  2297. than it is to read the following:
  2298.  
  2299. Resume.gif
  2300. PHOTOS.gif, and
  2301. videos.gif
  2302.  
  2303. Naming Convention Dos and Don'ts
  2304. Do Don't
  2305. PhotoAlbum.html Photo Album.html
  2306. shopping_cart.gif shopping cart.gif
  2307. shipping_costs.html shipping.costs.html
  2308. smith_resume.html amanda_smith_education_resume.html
  2309.  
  2310.  
  2311. File Organization
  2312. The way you organize your files should match the organization of your Web site. Let’s look at an example. Let’s say your site uses hierarchical navigation, as shown below.
  2313.  
  2314.  
  2315. Your file organization might look like the following:
  2316.  
  2317.  
  2318. In the image above, notice there are four folders and one HTML file in the root folder. One of the folders contains the images for the home page. The other three folders contain the files necessary to create the photos, courses, and resume Web pages.
  2319.  
  2320. File Organization Practice Exercise
  2321. Create a navigation flowchart for a Web site (or use one you’ve already created) and use it to determine how you will organize the files for your Web site.
  2322.  
  2323.  
  2324. Absolute and Relative Paths
  2325. An absolute path is a link that calls for a complete URL. The following are examples of absolute paths:
  2326.  
  2327. <a href=�https://roads.advancedacademics.com/educator.html�>
  2328.  
  2329. <a href=�http://www.nasa.gov/news/index.html�>
  2330.  
  2331. <a href=�http://www.whitehouse.gov/administration�>
  2332.  
  2333. A relative path, on the other hand, is a link that defines the location of the desired file based on the location of the link. For example, you can link to other files contained within the same folder as the link by simply linking to the Web page name. Look at the following examples.
  2334.  
  2335. <a href=�page.html�>
  2336.  
  2337. <a href=�image.gif�>
  2338.  
  2339.  
  2340. You can also link to files contained in other folders. Look at the file organization illustration to the left. Let�s say you create a path within the �index.html� page to display the �logo.jpg.� As you can see, the �logo.jpg� image is contained within a separate folder than the �index.html� page. But notice that the �images� folder, which contains the �logo.jpg� image, is contained in the same folder as the �index.html� page. Therefore you can simply indicate the folder name where the image is located within the path of your link.
  2341.  
  2342. Look at the following example:
  2343. <a href=�/images/logo.jpg�>
  2344.  
  2345. The �/images/� part of the link above tells the browser to look inside the �images� folder.
  2346.  
  2347. As if that wasn�t complicated enough, let�s look at an example that�s a little more complex. What if you are working in the �photos.html� page and you want to link to the �logo.jpg� image? Notice that the �photos.html� file is located within a completely separate folder than the �images� folder where �logo.jpg� is located. In this case, you�ll need to tell the browser to move �up� one directory, or folder, before looking for the file. Look at the following example:
  2348.  
  2349. <a href=�../images/logo.jpg�>
  2350.  
  2351. Notice that the link above starts with "../". This indicates that the browser should move �up� one directory, or folder, to find the file.
  2352.  
  2353.  
  2354.  
  2355. Question Number 1 Points: 5.00/5.00
  2356. Question Text
  2357. <HTML> is an example of which of the following?
  2358. Your Answer
  2359. C. Tags
  2360. Question Number 2 Points: 5.00/5.00
  2361. Question Text
  2362. Which HTML tag belongs in the blank in the code below?
  2363. <html>
  2364.  
  2365. <head>
  2366. <title>Shopping Cart</title>
  2367.  
  2368. </head>
  2369. <body><h1>Contents of shopping cart and prices *BLANK*
  2370. </body>
  2371.  
  2372. </html>
  2373. Your Answer
  2374. C. </h1>
  2375. Question Number 3 Points: 5.00/5.00
  2376. Question Text
  2377. What attribute is used to specify how much space there should be between the contents of the cell and its border in an HTML table?
  2378. Your Answer
  2379. B. Cellpadding
  2380. Question Number 4 Points: 5.00/5.00
  2381. Question Text
  2382. Which HTML tag belongs in the blank in the code below?
  2383. <html>
  2384.  
  2385. <head>
  2386. <title>Movie Titles</title>
  2387.  
  2388. </head>
  2389. <body><h1>Movie Titles</h1><br><h3>Classics</h3><br><p>List of movies</p><hr> *BLANK* Romance</h3><p>List of movies</p>
  2390. </body>
  2391.  
  2392. </html>
  2393. Your Answer
  2394. B. <h3>
  2395. Question Number 5 Points: 5.00/5.00
  2396. Question Text
  2397. In the HTML tag below, which part is highlighted in red?
  2398. <td>cell</td>
  2399. Your Answer
  2400. B. Contents
  2401. Question Number 6 Points: 5.00/5.00
  2402. Question Text
  2403. Which attribute is used to create a hyperlink?
  2404. Your Answer
  2405. C. href
  2406. Question Number 7 Points: 5.00/5.00
  2407. Question Text
  2408. What is the following an example of?
  2409. p {
  2410. color: #676767 }
  2411. Your Answer
  2412. B. Rule
  2413. Question Number 8 Points: 5.00/5.00
  2414. Question Text
  2415. The <ul> tag is used to create which of the following?
  2416. Your Answer
  2417. B. Bulleted list
  2418. Question Number 9 Points: 5.00/5.00
  2419. Question Text
  2420. In the tag below, what part is highlighted in red?
  2421.  
  2422. <body bgcolor="#000000">
  2423. Your Answer
  2424. A. Attribute
  2425. Question Number 10 Points: 5.00/5.00
  2426. Question Text
  2427. Which of the following tags is used to create a numbered list?
  2428. Your Answer
  2429. C. <ol>
  2430. Question Number 11 Points: 5.00/5.00
  2431. Question Text
  2432. Which of the following HTML entities will create a greater than or equal to sign?
  2433. Your Answer
  2434. C. &ge;
  2435. Question Number 12 Points: 5.00/5.00
  2436. Question Text
  2437. The tag below is an example of which of the following?
  2438.  
  2439. <a href=“blue.psd”>
  2440. Your Answer
  2441. C. Hyperlink
  2442. Question Number 13 Points: 5.00/5.00
  2443. Question Text
  2444. In the following HTML, what is the third item in the list?
  2445.  
  2446. <ul type=circle>
  2447. <li>Milk</li>
  2448. <li>Bread</li>
  2449. <li>Apples</li>
  2450. <li>Peas</li>
  2451. </ul>
  2452. Your Answer
  2453. A. Apples
  2454. Question Number 14 Points: 5.00/5.00
  2455. Question Text
  2456. In the HTML tag below, which part is highlighted in red?
  2457. <i>italics</i>
  2458. Your Answer
  2459. A. Closing tag
  2460. Question Number 15 Points: 5.00/5.00
  2461. Question Text
  2462. Which of the following HTML entities will create an angle sign?
  2463. Your Answer
  2464. A. &ang;
  2465. Question Number 16 Points: 5.00/5.00
  2466. Question Text
  2467. Which attribute is used to specify how much space there should be between the cells in the table?
  2468. Your Answer
  2469. C. Cellspacing
  2470. Question Number 17 Points: 5.00/5.00
  2471. Question Text
  2472. In the HTML code below, what does the "width" attribute define?
  2473. <table width="72">
  2474. <tr><td>One</td></tr>
  2475. <tr><td>Two</td></tr>
  2476. </table>
  2477. Your Answer
  2478. C. The width of the table
  2479. Question Number 18 Points: 5.00/5.00
  2480. Question Text
  2481. In HTML, what are words or abbreviated words closed in brackets?
  2482. Your Answer
  2483. C. Tags
  2484. Question Number 19 Points: 5.00/5.00
  2485. Question Text
  2486. What is CSS used for?
  2487. Your Answer
  2488. D. To define the style and format of one or more Web pages
  2489. Question Number 20 Points: 5.00/5.00
  2490. Question Text
  2491. In the following piece of CSS code, what is "small" called?
  2492. h2 {
  2493. font-size: small }
  2494. Your Answer
  2495. D. Value
  2496. Question Number 21 Points: 5.00/5.00
  2497. Question Text
  2498. Which HTML tag belongs in the blank in the code below?
  2499. <html>
  2500.  
  2501. <head>
  2502. <title>Report Card</title>
  2503.  
  2504. </head>
  2505. <body><h1>Report Card</h1><br><blockquote>Third Quarter *BLANK*
  2506. </body>
  2507.  
  2508. </html>
  2509. Your Answer
  2510. B. </blockquote>
  2511. Question Number 22 Points: 5.00/5.00
  2512. Question Text
  2513. Which of the following HTML entities will create a division sign?
  2514. Your Answer
  2515. C. &divide;
  2516. Question Number 23 Points: 5.00/5.00
  2517. Question Text
  2518. In the HTML tag below, which part is highlighted in red?
  2519. <b>bold</b>
  2520. Your Answer
  2521. C. Opening tag
  2522. Question Number 24 Points: 5.00/5.00
  2523. Question Text
  2524. Which of the following do you use to create HTML files?
  2525. Your Answer
  2526. C. Text editor
  2527. Question Number 25 Points: 5.00/5.00
  2528. Question Text
  2529. In the following piece of CSS code, what is "body" called?
  2530. body {
  2531. color: #ffffff }
  2532. Your Answer
  2533. C. Selector
  2534.  
  2535. Introduction to JavaScript
  2536. JavaScript is a scripting language used to add interactivity to Web pages. JavaScript is an object- oriented language. Object-oriented programming is a programming technique that focuses on objects and the actions those objects take rather than data and the logic behind that data.
  2537.  
  2538. Object-oriented programming involves objects, properties, and methods. Let’s start by defining these three terms.
  2539.  
  2540. Object
  2541. You already know what an object is. An object is just a thing. Take a quick look around you and identify a few of the objects you see. Your computer monitor, chair, and chalkboard are all considered objects.
  2542. In JavaScript, an object has the same definition. An object is anything you find on a Web page or site such as a window, button, table, or check box.
  2543. Property
  2544. A property is a characteristic of an object. This term is also the same for other situations. Think about one of the objects you identified earlier. Let’s take your chair, for example. Your chair might have a seat cushion. So, seat cushion is a property of the chair. In JavaScript, an example of a property might be the background color of a table.
  2545. Sometimes a property can be considered an object. For example, a cushion can be a property of a chair, but the cushion is actually an object as well. Or a check box can be a property of a form, but it can be an object on its own.
  2546. Method
  2547. A method is an action taken by an object. When your chair rolls across the floor, the act of rolling is considered a method. Let’s look at a JavaScript example of a method. A document can open, so the act of opening is considered a method.
  2548.  
  2549.  
  2550. Dot Syntax
  2551. JavaScript uses a method called dot syntax. Dot syntax is the practice of defining objects, properties and methods by listing them separated by a dot (.). Let’s look at some examples of how objects, properties, and methods can be defined using dot syntax.
  2552.  
  2553. table.bgcolor=“blue”
  2554.  
  2555. In the example code above, you can see an example of an object, a property, and a value. A value is the definition of a property or method. Any value contained in quotation marks is called a string value. In the example above, “table” is the object and “bgcolor,” or background color is the property. “Blue” is the value.
  2556.  
  2557. Let’s look at another example. Can you identify the object, property, method, and/or string value below?
  2558.  
  2559. document.write()
  2560.  
  2561. The example code above contains an object and a method. “Document” is the object. This is easy to spot because objects are always nouns. “Write” is the method. Methods are easy to spot because they are almost always verbs. Plus, methods are always followed up with a set of parentheses (()).
  2562.  
  2563. Dot Syntax Practice Problems
  2564. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  2565.  
  2566. In each of the following pieces of code, identify the object, property, method, and/or string value.
  2567.  
  2568. 1.
  2569. window.status
  2570. Answer Button
  2571.  
  2572. answer:
  2573. window=object
  2574. status=property
  2575.  
  2576. 2.
  2577. image.src
  2578. Answer Button
  2579.  
  2580. answer:
  2581. image=object
  2582. src=property
  2583.  
  2584. 3.
  2585. document.open()
  2586. Answer Button
  2587.  
  2588. answer:
  2589. document=object
  2590. open=method
  2591.  
  2592. 4.
  2593. button.name
  2594. Answer Button
  2595.  
  2596. answer:
  2597. button=object
  2598. name=property
  2599.  
  2600. 5.
  2601. document.bgcolor="black"
  2602. Answer Button
  2603.  
  2604. answer:
  2605. document=object
  2606. bgcolor=property
  2607. black=value
  2608.  
  2609. 6.
  2610. image.name="border.gif"
  2611. Answer Button
  2612.  
  2613. answer:
  2614. image=object
  2615. name=property
  2616. border.gif=value
  2617.  
  2618. 7.
  2619. window.closed
  2620. Answer Button
  2621.  
  2622. answer:
  2623. window=object
  2624. closed=property
  2625.  
  2626. 8.
  2627. button.click()
  2628. Answer Button
  2629.  
  2630. answer:
  2631. button=object
  2632. click=method
  2633.  
  2634. 9.
  2635. window.print()
  2636. Answer Button
  2637.  
  2638. answer:
  2639. window=object
  2640. print=method
  2641.  
  2642. 10.
  2643. object.getDate()
  2644. Answer Button
  2645.  
  2646. answer:
  2647. object=object
  2648. getDate=method
  2649.  
  2650.  
  2651. Events
  2652. An event is an action taken by the user. For example, a user might load a Web page, click a button, or submit a form. These actions are all examples of events. JavaScript creates the language to define actions (events) and the effects of those actions (events) upon objects. Statements called event handlers are used to define such actions. An event handler is a programmed response to an event.
  2653.  
  2654. Some examples of event handlers are listed below:
  2655.  
  2656. onClick—triggers a response when the user clicks on an object
  2657. onLoad—triggers a response when the user loads a Web page
  2658. onMouseover—triggers a response when the user rolls the mouse cursor over an object
  2659. “onClick,” “onLoad,” and “onMouseover” are specific examples of the language that JavaScript allows us to use within our programming.
  2660.  
  2661. Variables
  2662. In JavaScript, a variable is anything that is assigned a value. In the example below, “bgcolor” is a variable because it’s been assigned the value “black.”
  2663.  
  2664. document.bgcolor=“black”
  2665.  
  2666. In the next example, “name” is the variable and “border.gif” is the value.
  2667.  
  2668. image.name=“border.gif”
  2669.  
  2670. It’s important to note that variable names cannot contain spaces or punctuation. Neither can they start with a digit.
  2671.  
  2672.  
  2673. Events
  2674. An event is an action taken by the user. For example, a user might load a Web page, click a button, or submit a form. These actions are all examples of events. JavaScript creates the language to define actions (events) and the effects of those actions (events) upon objects. Statements called event handlers are used to define such actions. An event handler is a programmed response to an event.
  2675.  
  2676. Some examples of event handlers are listed below:
  2677.  
  2678. onClick—triggers a response when the user clicks on an object
  2679. onLoad—triggers a response when the user loads a Web page
  2680. onMouseover—triggers a response when the user rolls the mouse cursor over an object
  2681. “onClick,” “onLoad,” and “onMouseover” are specific examples of the language that JavaScript allows us to use within our programming.
  2682.  
  2683. Variables
  2684. In JavaScript, a variable is anything that is assigned a value. In the example below, “bgcolor” is a variable because it’s been assigned the value “black.”
  2685.  
  2686. document.bgcolor=“black”
  2687.  
  2688. In the next example, “name” is the variable and “border.gif” is the value.
  2689.  
  2690. image.name=“border.gif”
  2691.  
  2692. It’s important to note that variable names cannot contain spaces or punctuation. Neither can they start with a digit.
  2693.  
  2694. Adding Comments to Scripts
  2695. It’s often helpful to add comments to scripts to either remind yourself later what certain scripts have been written for or to help others who read your code to understand what they’re looking at. Comments can be added to scripts so they are visible within the code, but do not show up on the Web page. There are two ways to add comments to your scripts:
  2696.  
  2697. //Using two slashes will allow you to add a one-line comment.
  2698.  
  2699. /*Using a slash followed with an asterisk will allow you to add multi-line comments.
  2700.  
  2701. For multi-line comments, you must indicate the end of your comments with an asterisk followed by a slash: */.
  2702.  
  2703. <script>
  2704.  
  2705. //No matter what you type here, it won’t show up on your Web page
  2706.  
  2707. document.write("This is my first JavaScript page!");
  2708.  
  2709. /*
  2710.  
  2711. You can also make multi-line comments.
  2712.  
  2713. None of this text will appear on your Web page.
  2714.  
  2715. */
  2716.  
  2717. </script>
  2718.  
  2719.  
  2720. Adding JavaScript to a Web Page
  2721. Before we get started, it’s important to note that, unlike HTML, JavaScript is case sensitive. So it’s important to pay close attention as you’re writing JavaScript code.
  2722.  
  2723. JavaScript is written directly into HTML files. All JavaScript is contained within <script> tags, which can be put within the <head> tags or the <body> tags. The opening <script>tag tells the browser to start reading the text as JavaScript. The closing </script> tag tells the browser that the JavaScript is ending and to read the following text as HTML.
  2724.  
  2725. Copy (ctrl+c) and paste (ctrl+v) the following code into a text editor and save it as a Web page. Then, open it in a browser and see what it looks like. It should be a simple Web page with the statement “This is my first JavaScript page!” on it.
  2726.  
  2727. <html>
  2728.  
  2729. <body>
  2730.  
  2731. <script>
  2732.  
  2733. document.write("This is my first JavaScript page!");
  2734.  
  2735. </script>
  2736.  
  2737. </body>
  2738.  
  2739. </html>
  2740.  
  2741.  
  2742. Comparisons and Conditionals
  2743. Comparisons
  2744. There will be times when you want to compare a variable with another variable or with a particular value. For example, you might want a pop-up window to say "Happy Friday!" anytime a visitor comes to a Web site on a Friday. To do this, you'll need to compare the object "Day" with the value "Friday." The following comparison can be used to do this:
  2745.  
  2746. Day=="Friday"
  2747.  
  2748. A comparison is a line of JavaScript that measures, or compares, a variable against a defined value or another variable. A list of common comparisons is shown in the table below:
  2749.  
  2750. Comparison Function
  2751. ==
  2752.  
  2753. Is equal to
  2754.  
  2755. ===
  2756.  
  2757. Is exactly equal to
  2758.  
  2759. >
  2760.  
  2761. Is greater than
  2762.  
  2763. <
  2764.  
  2765. Is less than
  2766.  
  2767. >=
  2768.  
  2769. Is greater than or equal to
  2770.  
  2771. <=
  2772.  
  2773. Is less than or equal to
  2774.  
  2775. &&
  2776.  
  2777. And
  2778.  
  2779. ||
  2780.  
  2781. Or
  2782.  
  2783. !
  2784.  
  2785. Not
  2786.  
  2787.  
  2788.  
  2789. JavaScript Comparisons Practice Exercise
  2790. Use the table above to translate the following comparisons. The first one is done for you as an example.
  2791.  
  2792. 1.
  2793. x&&y=="5"
  2794.  
  2795. Answer Button
  2796. Answer:
  2797. Both x and y are equal to "5."
  2798.  
  2799. 2.
  2800. x<=y
  2801.  
  2802. Answer Button
  2803. Answer:
  2804. x is less than or equal to y.
  2805.  
  2806. 3.
  2807. x||y="yes"
  2808.  
  2809. Answer Button
  2810. Answer:
  2811. x or y is equal to "yes."
  2812.  
  2813. 4.
  2814. x>=y
  2815.  
  2816. Answer Button
  2817. Answer:
  2818. x is greater than or equal to y.
  2819.  
  2820. 5.
  2821. x==="0.4"
  2822.  
  2823. Answer Button
  2824. Answer:
  2825. x is exactly equal to "0.4".
  2826.  
  2827. 6.
  2828. x!=y
  2829.  
  2830. Answer Button
  2831. Answer:
  2832. x is not equal to y.
  2833.  
  2834. 7.
  2835. x||y=="0"
  2836.  
  2837. Answer Button
  2838. Answer:
  2839. x or y is equal to "0."
  2840.  
  2841. 8.
  2842. x&&y==="no"
  2843.  
  2844. Answer Button
  2845. Answer:
  2846. Both x and y are exactly equal to "no".
  2847.  
  2848. 9.
  2849. x>y
  2850.  
  2851. Answer Button
  2852. Answer:
  2853. x is greater than y.
  2854.  
  2855. 10.
  2856. x||y>="500"
  2857.  
  2858. Answer Button
  2859. Answer:
  2860. Either x or y is greater than or equal to "500."
  2861.  
  2862.  
  2863. Conditionals
  2864. Sometimes, you’ll want Web pages to respond differently to different conditions. For example, if it’s before 12:00pm, you might want the page to say “Good morning!” at the top. After 12:00 pm you might want the page to say “Welcome!” You’ve already learned how to use comparisons to determine whether the condition you want exists or not. In other words, you know how to program the browser to determine whether the time is before noon or not.
  2865.  
  2866. Defining Variables
  2867. The first step in writing a conditional is to define your variables. In order to determine the time, you need to determine the date. Let’s call this variable “Today.”
  2868.  
  2869. Today=new Date()
  2870.  
  2871. The function “new Date()” will call up all date information, such as month, day, year, and time. To extract the information you need from the new Date, you’ll need to define another variable:
  2872.  
  2873. Today=new Date()
  2874.  
  2875. Hour=Today.getHours()
  2876.  
  2877. In the script shown in red above, you are telling the browser to get the hour information from the variable “Today."
  2878.  
  2879. Here is a table of common JavaScript Date and Time functions:
  2880.  
  2881. Function Operation
  2882. Date() Returns a Date object
  2883. getDate() Returns a number (from 1 - 31) representing the date (day of the month) of a Date object.
  2884. getDay() Returns a number (from 0 - 6) representing the day of the week (0 = Sunday, 1 = Monday, etc.)
  2885. getMonth() Returns a number (from 0 - 11) representing the month of the Date object. (0 = January, 1 = February, etc.)
  2886. getFullYear() Returns a four-digit number representing the year of the Date object.
  2887. getHours() Returns a number (from 0 - 23) representing the hour of the Date object.
  2888. getMinutes() Returns a number (from 0 - 59) representing the minute of the Date object.
  2889. getSeconds() Returns a number (from 0 - 59) representing the second of the Date object.
  2890.  
  2891.  
  2892. Scripting Conditionals
  2893. Assuming you�ve already defined your variables, the following comparison will determine whether the time is before or after noon.
  2894.  
  2895. Hour<12
  2896.  
  2897. But there�s more to it than that. Now you need to tell the browser to say �Good morning!� if that statement (�Hour<12�) is true and to say �Good afternoon!� if it�s false. To do this, you�ll need to use a conditional, or an if-else statement. A conditional is a statement that instructs the browser to perform different actions under different conditions.
  2898.  
  2899. Today=new Date()
  2900.  
  2901. Hour=Today.getHours()
  2902.  
  2903. if (Hour<12)
  2904. {
  2905. document.write("Good morning!");
  2906. }
  2907.  
  2908. The above JavaScript will display �Good morning!� if the time is less than, or before, 12:00 pm. As the statement is written now, though, nothing will happen if the time after 12:00 pm. You need an else statement for that:
  2909.  
  2910. if (Hour<12)
  2911. {
  2912. document.write("Good morning!");
  2913. }
  2914.  
  2915. else
  2916. {
  2917. document.write("Welcome!");
  2918. }
  2919.  
  2920. Let�s look at the entire code all together:
  2921.  
  2922.  
  2923. Sometimes you want to perform the same action several times within the same Web page. For instance, you may want several buttons on a Web page that display different information when a user clicks each button. For example, you might have a “Contact Information” button and some “About this Image” buttons. The JavaScript necessary to pull up the alert boxes can be saved as a function so it doesn’t have to be written out for each button.
  2924.  
  2925. A function is a set of JavaScript statements that result in an action. Functions are defined within <script> tags in the <head> section of an HTML page. An example function is shown below:
  2926.  
  2927. <html>
  2928.  
  2929. <head>
  2930.  
  2931. <script language="javascript" type="text/javascript">
  2932.  
  2933. function AlertBox(message)
  2934. {
  2935. alert(message)
  2936. }
  2937.  
  2938. </script>
  2939.  
  2940. </head>
  2941.  
  2942. </html>
  2943.  
  2944.  
  2945. Now, this function can be called any number of times from within the body of the HTML page.
  2946.  
  2947. <html>
  2948.  
  2949. <head>
  2950.  
  2951. <script language="javascript" type="text/javascript">
  2952.  
  2953. function AlertBox(message)
  2954. {
  2955. alert(message)
  2956. }
  2957.  
  2958. </script>
  2959.  
  2960. </head>
  2961.  
  2962. <body>
  2963.  
  2964. <center><img src=“images/leaf.jpg”><br>
  2965.  
  2966. <input type="button" onClick="AlertBox('Image taken on 03/12/09. Copyright John Smith 2009');" value="About this Image" /><br><br>
  2967.  
  2968. <input type="button" onClick="AlertBox('Photographer: John Smith; 312-555-4329');" value="Contact Information" />
  2969.  
  2970. </center>
  2971.  
  2972. </body
  2973.  
  2974. </html>
  2975.  
  2976. The results of the script above are shown on the next page.
  2977.  
  2978.  
  2979.  
  2980. Question Number 1 Points: 5.00/5.00
  2981. Question Text
  2982. Which of the following is an example of a JavaScript object?
  2983. Your Answer
  2984. 7509239:C. Table ,7509240:D. Window
  2985. Question Number 2 Points: 5.00/5.00
  2986. Question Text
  2987. Which of the following accurately translates the following JavaScript comparison?
  2988. Hour<=12
  2989. Your Answer
  2990. D. The hour is less than or equal to 12.
  2991. Question Number 3 Points: 0.00/5.00
  2992. Question Text
  2993. If you want to repeat a series of JavaScript statements to perform a specific action several times throughout a Web page, which of the following might you use?
  2994. Your Answer
  2995. B. Comparison
  2996. Question Number 4 Points: 3.33/5.00
  2997. Question Text
  2998. Which of the following is an example of a JavaScript object?
  2999. Your Answer
  3000. 7509241:A. Check box ,7509244:D. Table
  3001. Question Number 5 Points: 2.50/5.00
  3002. Question Text
  3003. Which of the following is an example of a JavaScript object?
  3004. Your Answer
  3005. 7509245:A. Button
  3006. Question Number 6 Points: 0.00/5.00
  3007. Question Text
  3008. Which of the following is an example of a JavaScript property?
  3009. Your Answer
  3010. 7509249:A. Background color ,7509252:D. Table
  3011. Question Number 7 Points: 5.00/5.00
  3012. Question Text
  3013. What is a set of JavaScript statements that result in an action?
  3014. Your Answer
  3015. C. Function
  3016. Question Number 8 Points: 5.00/5.00
  3017. Question Text
  3018. What is the following script an example of?
  3019. Color==“Blue”
  3020. Your Answer
  3021. A. Comparison
  3022. Question Number 9 Points: 5.00/5.00
  3023. Question Text
  3024. What is a pop-up window that displays a message for the user and contains an “OK” button ?
  3025. Your Answer
  3026. A. Alert box
  3027. Question Number 10 Points: 5.00/5.00
  3028. Question Text
  3029. If you want a Web page to display a certain message depending on the time of day, which of the following would you use?
  3030. Your Answer
  3031. B. Conditional
  3032.  
  3033. Checking to See if JavaScript is Enabled
  3034. Although most modern browsers support JavaScript, it isn’t always enabled. To check to see if JavaScript is enabled in a visitor’s browser, you’ll need to create two <div> tags within the <body> tags of the Web page. Divisions, or sections of a Web page, are written as <div> tags. The browser will read these <div> tags whether JavaScript is enabled or not.
  3035.  
  3036. The first <div> tag will contain the message you want displayed if JavaScript is enabled in the browser. The second <div> tag will contain the message you want displayed if JavaScript is not enabled.
  3037.  
  3038. <div id="Enabled" style="visibility:hidden">JavaScript is enabled.</div>
  3039.  
  3040. <div id="Disabled">Please enable JavaScript in your browser.</div>
  3041.  
  3042. Notice the "id" attribute in each of the <div> tags above. This attribute defines the name of each division. One more attribute to note is the "style" attribute in the "jsEnabled" <div>. This attribute sets the visibility to hidden. As a result, this section will not appear if JavaScript is disabled.
  3043.  
  3044. Next, we need to create methods within a set of <script> tags directly after the <div> tags. Only browsers with JavaScript enabled will be able to read this section of the code.
  3045.  
  3046. <script language="javascript" type="text/javascript">
  3047.  
  3048. {
  3049.  
  3050. document.getElementById("Enabled").style.visibility = 'visible';
  3051.  
  3052. document.getElementById("Disabled").style.visibility = 'hidden';
  3053.  
  3054. }
  3055.  
  3056. </script>
  3057.  
  3058. The line "document.getElementById("Enabled").style.visibility=’visible’;" calls for the contents of the "Enabled" <div> to be displayed. The next line, "document.getElementById("Disabled").style.visibility=’hidden’;" calls for the contents of the "Disabled" <div> to be hidden. That way, the "Disabled" message will not show if JavaScript is enabled.
  3059.  
  3060.  
  3061. Script
  3062. Below, review the entire script needed to check whether JavaScript is enabled in a browser.
  3063.  
  3064.  
  3065. <html>
  3066.  
  3067. <body>
  3068.  
  3069. <div id="Enabled" style="visibility:hidden">JavaScript is enabled.</div>
  3070.  
  3071. <div id="Disabled">Please enable JavaScript in your browser.</div>
  3072.  
  3073. <script language="javascript" type="text/javascript">
  3074.  
  3075. {
  3076.  
  3077. document.getElementById("Enabled").style.visibility = 'visible';
  3078.  
  3079. document.getElementById("Disabled").style.visibility = 'hidden';
  3080.  
  3081. }
  3082.  
  3083. </script>
  3084.  
  3085. </body>
  3086.  
  3087. </html>
  3088.  
  3089.  
  3090.  
  3091. Checking for JavaScript Practice Exercise
  3092. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  3093.  
  3094. Create an HTML file that checks to see if JavaScript is enabled in a browser. Try changing the messages that are displayed when JavaScript is disabled and when JavaScript is enabled.
  3095.  
  3096. Answer Button
  3097. Your script will differ, but you can look at the script below as an example. The red bold text shows the message that displays when JavaScript is enabled. The orange bold text shows the message that displays when JavaScript is disabled
  3098.  
  3099. <html>
  3100.  
  3101. <body>
  3102.  
  3103. <div id="Enabled" style="visibilty:hidden">JavaScript is on!
  3104.  
  3105. <div id="Disabled" >JavaScript is off!</div>
  3106.  
  3107. <script language="javascript" type="text/javascript">
  3108.  
  3109. {
  3110.  
  3111. document.getElementByld("Enabled").style.visibility = 'visible';
  3112.  
  3113. document.getElementByld("Disabled".style.visibility = 'hidden';
  3114.  
  3115. }
  3116.  
  3117. </script>
  3118.  
  3119. <body>
  3120.  
  3121. <html>
  3122.  
  3123.  
  3124. Redirecting Visitors
  3125. One option to offer your visitors who don�t have JavaScript enabled is a non-JavaScript version of your Web page. All visitors will be directed to that page to start. From there, you can direct visitors who have JavaScript enabled to your JavaScript page. Non-JavaScript-enabled visitors will simply remain on the same page.
  3126.  
  3127. To send your JavaScript-enabled visitors to another Web page, you need to add the following script within a set of <script> tags in the <head> section of your HTML page.
  3128.  
  3129. <!--
  3130.  
  3131. window.location="alternate_site.html"
  3132.  
  3133. -->
  3134.  
  3135. Note: "alternate_site.html" will be replaced with the page you wish the visitors to be redirected to. If it is to another site, the full path to the site page will have to be included within the quotes.
  3136.  
  3137. See below for the entire script needed to send your JavaScript-enabled visitors to another Web page.
  3138.  
  3139. <html>
  3140.  
  3141. <head>
  3142.  
  3143. <script type="text/javascript">
  3144.  
  3145. <!--
  3146.  
  3147. window.location="https://roads.advancedacademics.com"
  3148.  
  3149. //-->
  3150.  
  3151. </script>
  3152.  
  3153. </head>
  3154.  
  3155. </html>
  3156.  
  3157.  
  3158.  
  3159. The following script will perform the time delayed redirection to an alternative site:
  3160.  
  3161. <html>
  3162. <head>
  3163.  
  3164. <script type="text/javascript">
  3165. <!--
  3166. function delayer(){
  3167. window.location = "../javascriptredirect.php"
  3168. }
  3169. //-->
  3170. </script>
  3171. </head>
  3172. <body onLoad="setTimeout('delayer()', 5000)">
  3173. <h2>Prepare to be redirected!</h2>
  3174. <p>This page is a time delay redirect, please update your bookmarks to our new location!</p>
  3175.  
  3176. </body>
  3177. </html>
  3178.  
  3179. Now, let's see the time delayed redirection in action.
  3180.  
  3181. This is a link which demonstrates the time delayed redirection in operation.
  3182.  
  3183. The most important part of getting the delay to work is being sure to use the JavaScript function setTimeout. We want the delayer() function to be used after 5 seconds or 5000 milliseconds (5 seconds), so we pass the setTimeout() two arguments.
  3184.  
  3185. 'delayer()'�The function we want setTimeout() to execute after the specified delay.
  3186. 5000�the number of millisecods we want setTimeout() to wait before executing our function. 1000 miliseconds = 1 second.
  3187. Redirecting Visitors Practice Exercise
  3188. Try the following problems below. Check to see if your answers are correct by clicking the Show Answer button:
  3189.  
  3190. Create an HTML file that sends JavaScript-enabled visitors to another Web page. Try changing the Web page that the visitors are sent to.
  3191.  
  3192. Answer Button
  3193.  
  3194. JavaScript is a great tool to use if you want to display the time or date on a Web page or call for a specific event to occur depending on the date or time.
  3195.  
  3196. Displaying the Date
  3197. You can use JavaScript to display the date on a Web page. All you need is one variable and one method:
  3198.  
  3199.  
  3200. The script above will display a date in the following format:
  3201.  
  3202. Fri Mar 06 2009 09:56:43 GMT-0600 (Central Standard Time)
  3203.  
  3204.  
  3205. Formatting the Date
  3206. You can specify the format by defining additional variables in your script. Look at the variables in the script below. Don’t worry if you don’t understand all of the script. Just notice how the script defines how the information should be displayed. For example, the day will be displayed as "Sunday," "Monday," or "Tuesday," and so on.
  3207.  
  3208.  
  3209. <body>
  3210.  
  3211. <script language="javascript" type="text/javascript">
  3212.  
  3213. var now=new Date();
  3214.  
  3215. var days=new Array( 'Sunday','Monday','Tuesday',
  3216. 'Wednesday','Thursday','Friday','Saturday');
  3217.  
  3218. var months=new Array('January','February','March','April','May',
  3219. 'June','July','August','September','October',
  3220. 'November','December');
  3221.  
  3222. var date=((now.getDate()<10) ? "0" : "") + now.getDate();
  3223.  
  3224. function fourdigits(number)
  3225.  
  3226. {
  3227.  
  3228. return (number > 1000) ? number + 1900 : number;
  3229.  
  3230. }
  3231.  
  3232. today=days(now.getDay()) + ", " + months(now.getMonth()) + " " +
  3233. date + ", " + (fourdigits(now.getYear()));
  3234.  
  3235. document.write(Today);
  3236.  
  3237. </script>
  3238.  
  3239. </body>
  3240.  
  3241. Now, look at the following line of script (shown in orange above):
  3242.  
  3243. Defines the code with the displayed result.
  3244. This variable defines the format of the date: Friday, March 6, 2009.
  3245.  
  3246.  
  3247. Displaying a Message Dependent on the Date and/or Time
  3248. Take a look at the scripting below. The various parts of the script should look familiar to you.
  3249.  
  3250.  
  3251. The first two lines in the script above define the variables. This piece of script calls for an event to occur dependent on the day of the week. But before you can determine the day, you need to determine the date. The variable "Today" calls for
  3252.  
  3253. Today=new Date()
  3254. The method “new Date()” will call up all date information, such as month, day, year, and time. To extract the information you need from the new Date, the second variable is defined:
  3255.  
  3256. Today=new Date()
  3257.  
  3258. Day=Today.getDay()
  3259. In the box above, the script shown in red tells the browser to get the day information from the variable "Today."
  3260.  
  3261. Now let’s look at the conditional:
  3262.  
  3263. Today=new Date()
  3264.  
  3265. Day=Today.getDay()
  3266.  
  3267. if (Day=5)
  3268.  
  3269. document.write("Happy Friday!");
  3270.  
  3271. }
  3272.  
  3273. else
  3274.  
  3275. {
  3276.  
  3277. document.write("Welcome!");
  3278.  
  3279. }
  3280.  
  3281.  
  3282. The script starts with a conditional, "Day=5" and goes on to say "If the day is equal to 5, then display 'Happy Friday!' Otherwise, display 'Welcome!'"
  3283.  
  3284.  
  3285. Creating a Countdown
  3286. The code for creating a countdown on your Web page is shown below. The example below counts down to graduation day. Remember, you don’t have to understand all of the script shown below. But you should be able to identify pieces of it well enough so you can edit the code for your own needs.
  3287.  
  3288.  
  3289. Click here for a list of common date/time JavaScript methods.
  3290.  
  3291.  
  3292. Working with Images
  3293. Creating Rollovers
  3294. A rollover is an image that is swapped out with another image when a user rolls a mouse cursor over the original image. To create a rollover, you must have two images that have the same dimensions: the original image and the image that appears when moused over.
  3295.  
  3296.  
  3297. It's important to note that the value of the "name" attribute in the image tag - "RolloverImage" - matches the src code in the Mouseover and Mouseout lines, which is "RolloverImage" as well.
  3298.  
  3299. onMouseover=RolloverImage src="'images/image01.gif'"
  3300. onMouseout=RolloverImage src="/contentserver/content/roadssection/333014/image02.gif">
  3301.  
  3302. This value can be anything you'd like it to be, as long as it's the same in all three places in the script.
  3303.  
  3304. Examine the following html script for an alternative way to create rollovers:
  3305.  
  3306. <html>
  3307. <head>
  3308. <title> Rollover </title>
  3309. <big><center>Advanced Academics</center></big>
  3310. <script language="JavaScript" type="text/javascript">
  3311. <!--
  3312. if (document.images) {
  3313. homebuttonup = new Image();
  3314. homebuttonup.src = "images/hardy1.jpg" ;
  3315. homebuttondown = new Image() ;
  3316. homebuttondown.src = "images/hardy2.jpg" ;
  3317. }
  3318. function buttondown( buttonname )
  3319. {
  3320. if (document.images) {
  3321. document[ buttonname ].src = eval( buttonname + "down.src" );
  3322. }
  3323. }
  3324. function buttonup ( buttonname )
  3325. {
  3326. if (document.images) {
  3327. document[ buttonname ].src = eval( buttonname + "up.src" );
  3328. }
  3329. }
  3330. // -->
  3331. </script>
  3332. </head>
  3333. <body><center>
  3334. <a href="https://roads.advancedacademics.com"
  3335. onmouseover="buttondown('homebutton')"
  3336. onmouseout="buttonup('homebutton')">
  3337. <img src="/contentserver/content/roadssection/333014/hardy1.jpg" name="homebutton" border="0" />
  3338. </a></center>
  3339. </body>
  3340. </html>
  3341.  
  3342.  
  3343. Creating Slide Shows
  3344. As a beginner JavaScript coder, being able to manipulate script is an important skill to have. Let�s look at the script below and see if you can use it to create a slideshow of images. Don�t worry if you don�t understand all of the script. Just make sure you recognize the parts of the script that you would alter to fit the code to your needs.
  3345.  
  3346. Variables define image files in slideshow.
  3347. Click here to see the slideshow in action.
  3348.  
  3349. Question Number 1 Points: 1.66/5.00
  3350. Question Text
  3351. Which of the following is an example of a JavaScript method?
  3352. Your Answer
  3353. 7509264:D. Write
  3354. Question Number 2 Points: 5.00/5.00
  3355. Question Text
  3356. What is the name of variable in the following JavaScript?
  3357.  
  3358. <body>
  3359. <script language="javascript" type="text/javascript">
  3360. Today=new Date()
  3361. document.write(Today);
  3362. </script>
  3363. </body>
  3364. Your Answer
  3365. C. Today
  3366. Question Number 3 Points: 5.00/5.00
  3367. Question Text
  3368. What tags are used to indicate a division on a Web page?
  3369. Your Answer
  3370. B. <div> and </div>
  3371. Question Number 4 Points: 2.50/5.00
  3372. Question Text
  3373. Which of the following is an inapporpriate JavaScript variable name?
  3374. Your Answer
  3375. 7509265:A. 01color
  3376. Question Number 5 Points: 5.00/5.00
  3377. Question Text
  3378. Which of the following is an example of a JavaScript property?
  3379. Your Answer
  3380. 7509254:B. Color ,7509255:C. Name
  3381. Question Number 6 Points: 5.00/5.00
  3382. Question Text
  3383. Which of the following accurately translates the following JavaScript comparison?
  3384. Day!=2
  3385. Your Answer
  3386. D. The day is not equal to 2.
  3387. Question Number 7 Points: 5.00/5.00
  3388. Question Text
  3389. What will the browser display as a result of the following JavaScript?
  3390.  
  3391. <body>
  3392. <script language="javascript" type="text/javascript">
  3393. Today=new Date()
  3394. document.write(Today);
  3395. </script>
  3396. </body>
  3397. Your Answer
  3398. D. Today's date
  3399. Question Number 8 Points: 5.00/5.00
  3400. Question Text
  3401. Which of the following is an example of a JavaScript object?
  3402. Your Answer
  3403. 7509239:C. Table ,7509240:D. Window
  3404. Question Number 9 Points: 3.33/5.00
  3405. Question Text
  3406. Which of the following is an example of a JavaScript object?
  3407. Your Answer
  3408. 7509241:A. Check box ,7509244:D. Table
  3409. Question Number 10 Points: 5.00/5.00
  3410. Question Text
  3411. What is the method in the script below?
  3412.  
  3413. Today=new Date()
  3414.  
  3415. Day=Today.getDay()
  3416.  
  3417. if (Day=1)
  3418. {
  3419. document.write("Class is scheduled for 2pm today.");
  3420. }
  3421.  
  3422. else
  3423. {
  3424. document.write("Welcome!");
  3425. }
  3426. Your Answer
  3427. B. getDay()
  3428. Question Number 11 Points: 0.00/5.00
  3429. Question Text
  3430. In the following script, what is the name of the JavaScript function?
  3431. <input type="button" onClick="AlertBox('Copyright 2009');" value="Copyright Info" />
  3432. Your Answer
  3433. C. Copyright Info
  3434. Question Number 12 Points: 5.00/5.00
  3435. Question Text
  3436. Which of the following is written as an if-else statement?
  3437. Your Answer
  3438. C. Conditional
  3439. Question Number 13 Points: 5.00/5.00
  3440. Question Text
  3441. Which of the following is an example of a JavaScript method?
  3442. Your Answer
  3443. 7509259:C. Open ,7509260:D. Print
  3444. Question Number 14 Points: 5.00/5.00
  3445. Question Text
  3446. Where are functions placed within a Web page?
  3447. Your Answer
  3448. B. In between <head> tags
  3449. Question Number 15 Points: 5.00/5.00
  3450. Question Text
  3451. In the following script, what will be displayed in the alert box?
  3452. <input type="button" onClick="AlertBox('Copyright 2009');" value="Copyright Info" />
  3453. Your Answer
  3454. C. Copyright 2009
  3455. Question Number 16 Points: 5.00/5.00
  3456. Question Text
  3457. In the following script, what message will be displayed in the browser if JavaScript is enabled?
  3458.  
  3459. <html>
  3460. <body>
  3461. <div id="Enabled" style="visibility:hidden">JavaScript 123</div>
  3462. <div id="Disabled">JavaScript ABC</div>
  3463. <script language="javascript" type="text/javascript">
  3464. {
  3465. document.getElementById("Enabled").style.visibility = 'visible';
  3466. document.getElementById("Disabled").style.visibility = 'hidden';
  3467. }
  3468. </script>
  3469. </body>
  3470. </html>
  3471. Your Answer
  3472. C. JavaScript 123
  3473. Question Number 17 Points: 5.00/5.00
  3474. Question Text
  3475. Which of the following accurately translates the following JavaScript comparison?
  3476. Age===12.5
  3477. Your Answer
  3478. B. The age is exactly equal to 12.5.
  3479. Question Number 18 Points: 2.50/5.00
  3480. Question Text
  3481. Which of the following is an inapporpriate JavaScript variable name?
  3482. Your Answer
  3483. 7509272:D. table.border
  3484. Question Number 19 Points: 5.00/5.00
  3485. Question Text
  3486. In the following script, what is the filename of the image that appears when the mouse is NOT over it?
  3487.  
  3488. <body>
  3489. <script language="javascript" type="text/javascript">
  3490.  
  3491. <a href=“photos.html”
  3492.  
  3493. onMouseover=Photo_but.src=‘images/photo_button01.gif’”
  3494.  
  3495. onMouseout=Photo_but.src=‘images/photo_button02.gif’”>
  3496.  
  3497. <img src=“images/photo_button02.gif” originalAttribute="src" originalPath="“images/photo_button02.gif”" name=“Photo_but”>
  3498.  
  3499. </a>
  3500.  
  3501. </script>
  3502. </body>
  3503. Your Answer
  3504. D. photo_button02.gif
  3505. Question Number 20 Points: 5.00/5.00
  3506. Question Text
  3507. Which of the following is recommended when creating rollover images?
  3508. Your Answer
  3509. B. The two images should have the same dimensions.
  3510. Question Number 21 Points: 5.00/5.00
  3511. Question Text
  3512. What is a section of a Web page called?
  3513. Your Answer
  3514. B. Division
  3515. Question Number 22 Points: 5.00/5.00
  3516. Question Text
  3517. What is an image that is swapped out with another image when a user rolls a mouse cursor over the original image?
  3518. Your Answer
  3519. D. Rollover
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement