Exam Review

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

This is a sketch of a Root directory for web development. Which of the following statements are true (select all that apply)? a. the home page is located on the top level of the root; b. the cg-bin contains a Perl script; c. media files should be placed in their own subfolder; d. these subfolders are arranged by data type.

All Note: • index.html is located on the top level of the root; • the cgi-bin contains a *.pl script; • any additional media files should in their own subfolder; • these subfolders are labeled according to the type of data they contain.

Jose is working on a Web page for his company's intranet. He wants to insert an HTML comment within the page to let other developers know that the page validates as HTML5 and that he is the page author. Which line of code will insert the comment that Jose requires? a. /* Jose Shmoe, 2/14/2013. This code validates to HTML5 */ b. <? Jose Shmoe, 2/14/2013. This code validates to HTML5 /> c. // Jose Shmoe, 2/14/2013. This code validates to HTML5 // d. <!--Jose Shmoe, 2/14/2013. This code validates to HTML5-->

d

You used the a:link link state in the anchor (<a>) element of a CSS file. What does this link state do? a. It determines the color of unvisited hyperlink text. b. It references a style sheet that specifies formatting for the page. c. It removes the underline from visited hyperlink text. d. It determines the target URL of hyperlinks.

a Note: The a:link link state of the anchor (<a>) element determines the color of unvisited hyperlinks on a Web page. The a:visited link state determines the color of visited hyperlinks on a Web page. The target URL for a hyperlink is determined by the href attribute of the <a> tag, which creates a hyperlink. The <link> element can be added to the <head> section of a Web page to reference a style sheet for formatting that page.

Consider the following HTML code: <blockquote> <img src="syb/syb.png" alt="Join a summer build!" style="float:right"/> The Summer Youth Build allows students to help others while having fun on the job. </blockquote> Where on the page will the image appear? a. To the right of the text b. To the left of the text c. At the bottom of the page d. At the top of the page

a

You are assigned to modify an existing Web page by adding several tables that contain precise wording. The Web page has had several developers working on it, each of whom were given strict instructions about text wording. All the developers belong to your team and will probably be working on the same page again after you finish your tasks. Which strategy represents good coding practice in this situation? a. Insert hidden comments to identify the nature and date of your changes. b. Delete the previous work from other developers and replace it with your own to clarify the page. c. Delete all older code so that the page validates correctly. d. Change all the wording on this page to agree with other pages on the site.

a

Why is it important to limit words to clear, necessary verbiage on your Web pages, especially on the home page? a. Because most users simply scan pages quickly looking for specific information or links to it. b. Because you need to leave room for the comments you placed in the code. c. Because you need to leave room for tangential information that elaborates on the main topics. d. Because navigation aids should occupy most of the space on Web pages.

a Note: A good Web page layout makes the page aesthetically pleasing, and easy to scan, read and navigate. It is important to be succinct by limiting words to clear, necessary verbiage, especially on the home page. Most users simply scan pages quickly looking for specific information or links to it. Let users navigate to additional pages if they want more information. Navigation aids should help the user to navigate the site, but should not occupy most of the space on a page. Comments you place in code do not appear on a Web page. No tangent message, regardless of its importance, should be added to a page.

Which line of HTML creates a valid hyperlink to the target named "targetArea2"? a. <a href="#targetArea2"> Top of the FAQ </a> b. <a href="targetArea2"> Top of the FAQ </a> c. <target="#targetArea2">Top of the FAQ </target> d. <a internal="#targetArea2"> Top of the FAQ </a>

a Note: Creating an internal link requires two steps. You must first use the anchor element, <a>, with the id attribute to define an area as a target (the bookmark or anchor). Then, in another portion of the page, you create the link that points to the bookmark using the anchor element with the hypertext reference (href) attribute. Tech Note: In this example, the <a id> tag appears above the <a href> tag in the code. These tags can appear in either order in a document — it simply depends on whether the target <a id> appears above or below the link to it <a href> on the rendered page.

Your Web team needs to be able to structure Web pages by dividing them into sections, and you want to ensure that any code they write will pass W3C validation tests for HTML5. Which of the following should the team use in conjunction with CSS to fulfill these requirements? a. The <header>, <footer>, <nav>, <article> and <aside> elements b. The <div>, <table>, <article> and <aside> elements c. The <header>, <footer>, <div> and <table> elements d. The <div> and <table> elements

a Note: HTML5 with CSS has introduced specific elements to define the document structure. These elements include <header>, <footer>, <nav>, <article>, and <aside>. The <header> element defines the top of the Web page, similar to the header in a word-processing document. The <footer> element defines the bottom of the Web page, similar to the footer in a word-processing document. The <nav> element appears on the left side of the page and defines navigation links, such as hypertext menus to access various pages of the Web site. The <article> element is the middle section of the page that contains Web site content, such as company services, articles, blogs, images and videos. The <aside> element appears on the right side of the page and defines content that is "aside" from the article content, such as advertisements or news feeds. The <table> and <div> tags were used to format pages prior to the advent of HTML5, and should not be used for HTML5-compliant documents.

You have decided to use relative links for your Web site's local pages instead of specifying absolute URLs. Your supervisor has asked you to justify this decision. Which statement provides the best justification? a. The site can be moved from one server to another with minimal disruption. b. Apache Server does not support absolute URLs. c. All pages can be quickly updated by altering the contents of a single file. d. Microsoft IIS does not support absolute URLs.

a Note: If you use relative URLs for your local hyperlinks, you will be able to move your site from one server to another with minimal disruption. A local hyperlink is a link you create from one file on your local system to another file on your local system. You create these types of links when you are developing your own pages and linking them to create a site. Your files can be uploaded to a Web server in the same directory structure you save on your system, so your file references can remain unchanged as long as your directory structure persists.

Which HTML tag is used to contain content in a table cell? a. <td> b. <tr> c. <table> d. <th>

a Note: In HTML, the <td> element is used to contain content in a table cell. The <tr> element creates a row within a table. The <th> element creates a table header and applies larger, bold text style. The <table> element creates the overall table structure and contains all other table elements.

Consider the following Cascading Style Sheets (CSS) rule: body {color: teal;} Which is the "property" portion of this rule? a. The portion that reads "color" b. The portion that reads "teal" c. The portion inside the braces d. The portion that reads "body"

a Note: In the example Cascading Style Sheets (CSS) rule given, the portion that reads "color" is the property. The portion inside of the braces is called the declaration. The portion that reads "body" is called the selector, and the portion that reads "teal" is called the value.

Consider the following portion of HTML code for creating a table: <table border="1"> <caption> Habitat for Humanity Activities </caption> Which statement correctly describes the resulting table? a. The words "Habitat for Humanity Activities" will be placed outside a visible border. b. The table will have visible borders. c. The words "Habitat for Humanity Activities" will be placed inside a visible border. d. The table will have invisible borders.

a Note: In this example, the table will have a visible border, but the words "Habitat for Humanity Activities" will not be placed inside the border. The <caption> element inside of a table adds a caption or title, which appears above the table by default.

Which statement is accurate about the use of tables in HTML5? a. Tables should be used whenever information lends itself to being presented in tabular format. b. Tables should not be used to present information; use the <pre> tag instead. c. Tables must be used to structure a document, or the code will not validate as HTML5. d. Tables should not be used to present information; use the <div> tag instead.

a Note: Tables should be used whenever information lends itself to being presented in tabular format. In previous versions of HTML, tables were often used to add structure to entire documents. In HTML5, tables should not be used this way. Rather, you should use HTML5 with CSS to structure documents. You can also use the <pre> tag to structure tabular data. However, the <pre> tag does not allow you to format data exactly as you want it.

Which of the following is a typical problem that occurs when a hyperlink is not correctly coded? a. Text and images disappear. b. The page downloads slowly. c. The browser crashes. d. The page will not download.

a Note: Text and images can disappear if you improperly code a hyperlink. Other problems that can occur if you improperly code your hyperlinks include the following: the remaining page (including images) beneath the problem hyperlink may appear as all hyperlinked text; code and wording might appear garbled; pages may not validate.

Roberto is creating a Web page using HTML5. He wants to indent a quote on the page. Which element should he use to accomplish this? a. <p> with text-align attribute b. <blockquote> c. <pre> d. <center> and <i>

b

Which statement most accurately describes the CSS "text-align" property used with the <table> element? a. It aligns table cells horizontally. b. It aligns text horizontally. c. It aligns table cells vertically. d. It aligns text vertically.

b

Consider the following Cascading Style Sheets (CSS) rule: body {color: teal;} Which is the "declaration" portion of this rule? a. The portion that reads "color" b. The portion that reads "body" c. The portion inside the braces d. The portion that reads "teal"

c

Which of the following is a valid HTML reference to a CSS file? a. <stylesheet="text/css" title="syb/syb.css" href="stylesheet"/> b.<link title="stylesheet" href="text/css" type="stylesheet"/> c. <link rel="stylesheet" type="text/css" href="syb/syb.css" title="stylesheet"/> d. <link href="text/css" type="syb/syb.css" title="stylesheet"/>

c

User-entered information has been passed from a Web form to a database server. Where is the CGI script located? a. In the network firewall b. On the database server c.On the Web server d. On the user's hard drive

c Note: A CGI script that passes data from a Web form to a database server is located on the Web server. It is not located on the network firewall or anywhere on the end user's system. A CGI script passes information from the Web form to the database server. A CGI script can be created using various languages, from Perl to Java.

In Cascading Style Sheets (CSS), what is a rule? a. A set of values that can be specified for a given selector b. A set of values that can be applied to a given property c. A format instruction that consists of a specified selector and the properties and values applied to it d. An HTML tag in a Web page that references the style sheet to be applied

c Note: A style sheet consists of all the rules to be applied to a document.

Consider the following portion of HTML code for creating a table: <table border="1"> <tr> <th>Price</th> <th>Quantity</th> </tr> <tr> <td>13.95</td> <td>72</td> </tr> </table> Also consider the corresponding CSS document code: table, td, th { border:1px solid gray; } td, th { padding:6px; border-spacing:2px; } Which statement correctly describes the resulting table? a. Each cell in the table will be separated from the other cells by 1 pixel more than the default. b. Each cell will have 1 pixel more than the default of space between the content and the cell border. c. Each cell in the table will be separated from the other cells by 2 pixels more than the default. d. Each cell will have 2 pixels more than the default of space between the content and the cell border.

c Note: Each cell in the table will be separated from the other cells by 2 pixels more than the default. The border-spacing property determines the amount of space between the borders of adjacent cells. The padding property determines the space between content and the cell border.

Which file format supports transparency, interlacing and animation? a. GIF 89a b. JPEG c. BMP d. GIF 87a

a Note: The GIF 89a image file format supports transparency, interlacing and animation. The GIF 87a standard does not support animation. The JPEG format does not support transparency, interlacing or animation. The BMP image format does not support animation.

How many colors are specified in the browser-safe color palette? a. 16 b. 16.7 million c. 255 d. 216

d Note: The browser-safe color palette contains 216 colors. When Netscape Corporation marketed the first browser that supported inline images, it created a standard of 216 colors that would render consistently, known as the browser-safe color palette. Chrome, Firefox, Internet Explorer and other browsers conform to this list of colors.

Which line of code will create a Web form check box that will validate as HTML5? a. <input type="checkbox" name="groupName"/> b. <input type="check" name="groupName"> c. <input type="check" name="groupName"/> d. <input type="checkbox" name="groupName">

a Note: The correct code to create a check box requires the use of the <input> element, with the type="checkbox" attribute and value. You must also include the name attribute with a name for the check box group. HTML5 standards require you to close the tag with a slash at the end.

Which line of code creates a text box in a Web form that will validate as HTML5? a. <input type="text" name="UserName"/> b. <input type="text" name="UserName"> c. <input type="area" text="UserName"> d. <input text="area" name="UserName"/>

a Note: You must remember to close the tag with a slash at the end in order for your code to validate as HTML5.

What does the follow input element of a form create: <textarea name="message" rows="10" cols="30"> The cat was playing in the garden. </textarea>

It creates an input text area consisting of 10 rows each 30 characters wide for input.

Consider the following HTML code that resides on a server named www.habitat.org: To learn more about Habitat, click the following link: <a href="http://www.habitat.org/getinv">Learn more! </a> Which of the following describes this code? a. It creates an external link. b. It creates a link to an image. c. It creates an internal link. d. It creates a link to an external file's internal link.

a Note: The code in this example creates an external link. The URL given, http://www.habitat.org/getinv, specifies an external resource, and the link is to a Web page, not an image file. It is not a link to a file's internal link, because the URL does not specify a place on the external resource's page.

Consider the following HTML code: <a href="indexes/index.html"> CCYP Home </a> Which type of hyperlink reference is given in this code? a. Partial URL b. Secure site URL c. Fully qualified URL d. Absolute URL

a Note: The given code references a partial URL (also known as a relative URL). A partial URL is a URL that assumes the current document's path. All references are made from the document's current directory. Links are created with the anchor element, <a>. Anchor elements are container tags that encompass the text or image (or both) to be used as the link. The href attribute is used to specify the link's hypertext reference, or the target of the link. You can specify a fully qualified URL (also called an absolute URL) or a partial URL reference for any file, page or site.

Which line of code represents a valid way to use an image as a hyperlink, and will validate in an HTML5 page? a. <a href="http://www.habitat.org"> <img src="questions.jpg" id="questions" alt="Questions" border="0"/> </a> b. <img src="questions.jpg" link="http://www.habitat.org" id="questions" alt="Questions"/> </a> c. <a href="http://www.habitat.org" img src="questions.jpg" id="questions" alt="Questions"/> </a> d. <a href="http://www.habitat.org"> <img "questions.jpg" border="0"/> </a>

a Note: You can create a hyperlink from a graphical image by surrounding the image tag with opening and closing anchor tags. To use an image as a hyperlink, the following code will validate in an HTML5 page: <a href="http://www.habitat.org"> <img src="questions.jpg" id="questions" alt="Questions" border="0"/> </a>

Consider the following HTML code: <h1> Welcome to the Habitat for Humanity Web Site </h1> <hr/> <p> Habitat for Humanity is a not-for-profit organization that provides decent, affordable housing. </p> What is the default width of the horizontal line created on this page? a. 100 percent b. 75 percent c. 25 percent d. 50 percent

a Note: You can use CSS inline styles to stylize horizontal rules. The style attribute has a width property that can control how far the line extends across the screen. By default, the value of the width value is 100 percent. Thus the line in the example extends from the left margin across to the right margin in the browser window, or the entire width of the window. The following code would create a horizontal rule that extends across 50 percent of the page: <hr style="width=50%;"/>.

Your company introduced a new product one month ago. Since then, the Web site has processed so many orders that the shipping and handling department has become overwhelmed. Also, sales representatives have been overwhelmed with questions about the product. The sales team needs a more efficient way to reduce questions about the new product so they can concentrate on generating more orders. What can your Web team do to help reduce the questions directed to the sales team? a. Raise the price of the item being sold. b. Create a glossary or FAQ page. c. Create a new Web site dedicated to the product. d. Enable SSL.

b Note: A glossary or Frequently Asked Questions (FAQ) page on a Web site can provide end users with quick answers. As a result, users may spend less time calling the sales team. Generally, the glossary or FAQ would be created or at least approved by sales and marketing. A glossary can provide a helpful navigation feature, especially if your site introduces concepts and terms to an audience that is unfamiliar with your practices. A glossary can also help index and catalog your site.

Consider the following portion of HTML code for creating a table: <table border="1"> <tr> <th>Price</th> <th>Quantity</th> </tr> <tr> <td>13.95</td> <td>72</td> </tr> </table> Also consider the corresponding CSS document code: table, td, th { border:1px solid gray; } td, th { padding:6px; border-spacing:2px; } Which statement correctly describes the resulting table? a. Each cell in the table will be separated from the other cells by 1 pixel more than the default. b. Each cell will have 6 pixels more than the default of space between the content and the cell border. c. Each cell in the table will be separated from the other cells by 6 pixels more than the default. d. Each cell will have 2 pixels more than the default of space between the content and the cell border.

b Note: Each cell in the table will have 6 pixels more than the default of space between the content and the cell border. The padding property determines the space between content and the cell border. The border-spacing property determines the amount of space between the borders of adjacent cells.

In an HTML form, the <input> tag is used to: a. create lists of choices from which users make selections. b. create text boxes, radio buttons and Submit buttons. c. collect all input and combine it into a query string. d. create a text box for users to write longer comments.

b Note: In an HTML form, the <input> tag is used to create text boxes, check boxes, radio buttons, and the Submit and Reset buttons. The <textarea> tag creates a text box in which users can write longer comments. The <select> tag is used to create lists of selections.

Consider the following portion of HTML code for creating a table: <table border="1"> <tr> <th>Price</th> <th>Quantity</th> </tr> <tr> <td>13.95</td> <td class="center">72</td> </tr> </table> Also consider the corresponding CSS document code: table, td, th { border:1px solid gray; } td.center { text-align:center; } Which statement accurately describes the position of the number "72" in a table cell? a. The number will be aligned to the bottom of the cell. b. The number will be aligned horizontally to the center of the cell. c. The number will be aligned vertically to the center of the cell. d. The number will be aligned to the top of the cell.

b Note: In this example, the number "72" will be aligned horizontally to the center of the table cell. The CSS text-align property aligns content horizontally. The text-align property takes the values "left", "center", "right" and "justify." The CSS vertical-align property aligns content vertically; it takes the values "top", "bottom" and"middle."

You are creating a table on a Web page for your company's Web site. Your Web team leader has directed you to add more white space within the table cells so that content does not appear crowded. How can you accomplish this? a. Decrease border spacing b. Increase cell padding c. Decrease cell padding d. Increase border spacing

b Note: Increasing the cell padding within table cells will help increase the amount of white space that appears between cell data and cell borders. As a result, content may appear less crowded. You adjust cell padding with the CSS padding property. Border spacing is the space between the borders of adjacent cells and is adjusted using the CSS border-spacing property.

You can use a CSS style sheet rule to override the default <body> font color, which is black. Which term is used to describe this style sheet behavior? a. Hierarchy b. Inheritance c. Structure d. Rules

b Note: Inheritance is a CSS behavior in which the styles you define will flow, or cascade, throughout the document unless another style defined within the page specifically overrides it. Many styles can be used together to create a completely formatted document. For example, a style sheet rule will override the default <body> font color, which is black. All these characteristics, whether they are defined in a style sheet or exist by default, are inherited throughout the rest of the document.

Which HTML element is used to create a hyperlink? a. <link> b. <a> c. <alink> d. <href>

b Note: Links are created with the anchor element, <a>. Anchor elements are container tags that encompass the text or image (or both) to be used as the link. The href attribute is used to specify the link's hypertext reference, or the target of the link. You can specify a fully qualified URL or a relative URL reference for any file, page or site. The <link> element is used in the <head> section to reference an external style sheet for a Web page. The alink attribute of the <body> element determines the color of links when the mouse is pressed but not released over the link.

Table element attributes are not supported in HTML5; CSS must be used. Which is the only table element attribute you can still use for HTML5-compliant tables? a. Cellpadding b. Border c. Summary d. Cellspacing

b Note: Table element attributes are not supported in HTML. CSS must be used. The only <table> element attribute still used is border, which simply states if the table has a border or not. The border attribute has a value of "0" for no border, and "1" for a border. The style of the border is defined in CSS.

While editing an HTML page, you see the following line of code: <img src="images/habitat.png" alt="PNG image"/> Where is the image named habitat.png located? a. In the images folder on another Web site b. One folder below the location of the Web page being edited c. One folder above the location of the Web page being edited d. In the images folder on your desktop

b Note: The image resides one folder below the location of the Web page being edited. The <img> element used in this example references a relative path name. This path name refers to a subfolder called "images," which contains the habitat.png image and any other image files.

In an HTML form, what is the purpose of the name attribute in an <input> tag? a. It identifies the type of field or button that will appear in the form. b. It identifies the form input received in a name=value pair by the site's administrator. c. It labels the form field so the user knows the type of input expected. d. It is required for the form to render in all browsers.

b Note: The name attribute corresponds to the input in a name=value pair. Name=value pairs are returned to the server in a raw text string when the user submits the form. The name attribute organizes the raw text string, and makes it easy for the site administrator to read and interpret.

When creating a Web form in HTML, what is the purpose of the name attribute? a. It acts as a comment, informing the data recipient about the name of the Web form's creator. b. It identifies data received from a user and associates it with a value specified by the form's creator. c. It acts as a comment, informing the data recipient about name of the end user sending data. d. It identifies data sent from the database to the e-mail server to inform the data recipient about the sending application.

b Note: The name attribute in a Web form's code is used to identify information received from a user and associate it with a value specified by the form's creator. This function helps organize user input and is common to all form fields.

You want to create a horizontal rule on your Web page that is 10 pixels high and occupies 20 percent of the screen. You also want to ensure that the page validates as HTML5. Which line of HTML code will fulfill these requirements? a. <hr style=height=10 width=20%/> b. <hr style="height:10px; width:20%;"/> c. <hr style="height=10px width=20%"/> d. <hr style=height=10px; width=20%;/>

b Note: The style attribute has a width property that can control how far the line extends across the screen. The width property must specify "20%" (with the percentage symbol). The style attribute also has a height property that can control the height of the line. The height property must specify the height in pixels (abbreviated "px"). The properties and values must always be enclosed in quotes and separated by semicolons.

On your Web page, you want to create a table in which the left column header spans three rows. Which tag would accomplish this goal? a. <td rowspan="3"> b. <th rowspan="3"> c. <th colspan="3"> d. <tr colspan="3">

b Note: To create a table in which the left column header spans three rows, you would use the rowspan attribute for the <th> element. The colspan attribute is used to span multiple columns. You can use the rowspan or colspan attribute with the <td> element, but in this example you want to apply the spanning to the header column. You would not use the rowspan or colspan attribute with the <tr> element.

You want to create a table in which the top row spans three columns. Which tag would accomplish this goal? a. <td rowspan="3"> b. <th colspan="3"> c. <tr colspan="3"> d. <th rowspan="3">

b Note: To create a table in which the top row spans three columns, you would use the colspan attribute with the <th> element. You can use the rowspan or colspan attribute with the <td> element, but in this example you want to apply the spanning to the header row. You would not use the rowspan or colspan attribute with the <tr> element.

Consider the following portion of HTML code for creating a table : <table> <caption> Habitat for Humanity Activities </caption> How can you modify this code so that the table border is visible? a. No modification is needed; the table will render with a visible border automatically in most browsers. b. Add the border attribute with a value of "1". c. Add the showborder attribute. d. Add the border attribute with a value of "yes".

b Note: To make a table border visible in HTML5, you would add the border attribute with a value of "1". Table element attributes are not supported in HTML. CSS must be used. The only <table> element attribute still used is border, which simply states if the table has a border or not. The border attribute has a value of "0" for no border, and "1" for a border. The style of the border is defined in CSS.

Consider the following portion of HTML code for creating a table: <table border="1"> <tr> <th>Price</th> <th>Quantity</th> </tr> <tr> <td>13.95</td> <td class="center">72</td> </tr> </table> Also consider the corresponding CSS document code: table, td, th { border:1px solid gray; } td.center { text-align:center; } How could you modify this code so the number "72" moves to the left? a. Change the value of the CSS text-align property to "default." b. Change the value of the CSS text-align property to "left." c. Change the value of the CSS text-align property to "justify." d. Replace the CSS text-align property with the CSS vertical-align property and assign to it the value "left."

b Note: To modify this code so the number "72" moves to the left, you would change the value of the CSS text-align property to "left." The CSS text-align property aligns content horizontally. The text-align property takes the values "left", "center", "right" and "justify." The CSS vertical-align property aligns content vertically; it takes the values "top", "bottom" and"middle."

Which approach is ideal for ensuring that a Web page is maintained and does not appear neglected? a. Using internal hyperlinks in essential pages b. Using automated link-checking software c. Using a GUI HTML editor d. Using active content

b Note: Using automated link-checking software will help you ensure that a Web page is maintained and does not appear neglected to users. Periodically, you must check both the external and internal hyperlinks on your Web pages to verify that they still work. Links can become invalid for a variety of reasons, most commonly because a referenced page is moved or deleted, or because page content is changed and anchors are renamed or lost. As a result, a page can appear "stale" or neglected to end users because it lacks maintenance.

Your team needs to evaluate a Web site primarily designed for consumption in a particular country. Which of the following is a relevant question to ask during this process? a. What language will be used to create the CGI for the Web forms? b. Is the color combination used effective for the culture(s) in the country? c. How many colors are available to the standard Web browser? d. Can end-users download the Flash plug-in from this country?

b Note: When evaluating Web design for a particular culture, you should focus on issues such as whether the color combinations in the site design are effective for the culture(s) in the country. Language choice for CGI applications is not a specific design issue, nor is the availability of Flash plug-ins. Although investigating the availability of Web browser colors is somewhat relevant, it is less so than determining effective color combinations for particular cultures in a country.

You are writing HTML code for your Web page. You use hexadecimal notation to specify the RGB values you want to use on the page. What aspect of your Web page are you specifying with these values? a. Image sizes b. Colors c. Fonts d. Special non-keyboard characters

b Note: When specifying Red Green Blue (RGB) values for colors in a Web browser, you use hexadecimal notation. Colors are specified in RGB values ranging from 0 to 255. The hexadecimal value FF represents 255. Therefore, the hexadecimal value #FFFFFF represents the highest possible value for all three RGB colors, producing white. The hexadecimal value #000000 represents the absence of all colors, or black. The number symbol ( # ) is not required by current generation browsers, but you should include this symbol for full backward-compatibility.

You need to resize an image. Which choice lists attributes of the <img> element that enable you to do this? a. The top and bottom attributes b. The width and height attributes c. The length and width attributes d. The pixel and percent attributes

b Note: When using the <img> element, you can use the width and height attributes to adjust the size of an image. You must ensure the proper proportions, however, or you may distort the image.

Which example demonstrates the proper tag for inserting an image in HTML5? a. <img src="image.gif" alt=This is an image./> b. <img src="image.gif" alt="This is an image."/> c. <img src=image.gif alt="This is an image."/> d. <img src=image.gif alt=This is an image./>

b Note: When you insert an image using HTML5, you must use the src and alt attributes with the <img> element. You must also use a pair of container tags. The alt attribute provides alternative text to describe the image content in text-only browsers and browsers for sight-impaired users. The src attribute allows you to specify the image you are inserting. The attribute values must always be enclosed in quotation marks. Tech Note: If you upload your Web pages to a Web server and the images do not appear, check the <img src=" "> value of each image. If you created all of your images in a separate directory, make sure you uploaded that directory as well.

Your Web development team manager has directed you to make several changes to a Web page. Accordingly, you created a link from your page at www.habitat.org/ccyp.html to a story on a separate Web site not owned or run by your organization. Which step must occur before you make this change public? a. Verify that the remote server will remain available for at least 30 days. b. Obtain permission from the site's owner to publish this link. c. Obtain permission from your marketing department to publish this link. d. Verify that the remote page does not contain objectionable content, as determined by your marketing department.

b Note: You should not publish a link from your site to another site without first obtaining permission from that site's owner. Such a link may imply a business relationship or endorsement that is not appropriate. The other options given in this scenario may also be important steps depending on your organization, but are not general requirements.

Which property should you use in the body selector in an external CSS file to specify an image for a page background? a. background-color b. background-image c. page-background d. page-image

b You can add color information to the body selector in an external CSS file to control the colors of the page background. To specify an image for a page background, add the background-image property to the body selector. To specify a color for a page background, add the background-color property to the body selector.

You want to create an HTML5-compliant page that has four sections: a left-side section containing set of links, top and bottom sections, and a middle section that will contain the main message of the page. Which elements would you use to create these sections? a. The <header>, <footer>, <article> and <aside> elements b. The <header>, <footer>, <nav> and <article> elements c. The <div>, <nav>, <article> and <aside> elements d. The <header>, <footer>, <nav> and <aside> elements

b Note: HTML5 with CSS has introduced specific elements to define the document structure. These elements include <header>, <footer>, <nav>, <article>, and <aside>. The <header> element defines the top of the Web page, similar to the header in a word-processing document. The <footer> element defines the bottom of the Web page, similar to the footer in a word-processing document. The <nav> element appears on the left side of the page and defines navigation links, such as hypertext menus to access various pages of the Web site. The <article> element is the middle section of the page that contains Web site content, such as company services, articles, blogs, images and videos. The <aside> element appears on the right side of the page and defines content that is "aside" from the article content, such as advertisements or news feeds.

Your company has been getting complaints from its suppliers saying that its extranet site does not render correctly in all their employees' browsers. The suppliers want the extranet site to be fixed so that everyone can access it, regardless of browser type. When examining this problem, your Web Development manager finds that the many developers who worked on the site all used whatever HTML code version they knew best. What can the Web development team do to resolve this? a. Edit the code so that it consistently uses lowercase letters. b. Edit the code so that it follows a single W3C HTML standard. c. Edit the code so that it follows a single W3C scripting language standard. d. Edit the code in several common browsers before posting it.

b. Note: Another facet of good coding practice is creating universal markup that applies W3C standards consistently and thus renders consistently across most or all browsers. Remember to choose one HTML standard (version) for your Web document, pages or site, then apply that standard carefully and consistently throughout. Applying the syntax rules of multiple HTML standards in the same document or site not only prevents your code from validating but also produces unexpected rendering results in your users' browsers.

You request a Web page using your browser. This Web page includes an image that uses a color that is not supported by your browser. How will your computer compensate for this limitation? a. Your browser will issue a warning. b. The image will appear and be resized. c. The image will appear and be dithered. d. The Web page will appear without the image.

c Note: If a Web page's HTML code asks for a color that the browser or operating system cannot support, then the computer will compensate through dithering. Dithering is the ability for a computer to approximate a color by combining the RGB values. The results of dithering are unpredictable and often unsightly, so it is wise to choose colors you know will be supported when creating Web pages.

In the HTML5 standard, what is the recommended way to center a paragraph of text? a. Use the <blockquote> tag. b. Use an inline CSS center attribute in the paragraph tag. c. Use an inline CSS style attribute in the paragraph tag. d. Use the <center> tag.

c Note: In HTML5, you must use an inline CSS style attribute in the paragraph tag when you want to center a paragraph of text. The syntax is as follows: <p style="text-align:center"> This text is centered. </p>. In this example, the <p> tag encompasses the text you want to format. The style attribute tells the browser that the paragraph text should be aligned to the specified value, "center." The <center> tag is deprecated and should not be used. The <blockquote> tag centers and indents a block of text; however, do not use <blockquote> tags within <p> tags.

Consider the following HTML code from a page that resides on a Web server: <a href="../ccyp.html"> CCYP Home </a> According to this code, where does the file named ccyp.html reside on the Web server? a. In a directory one level below the current page b. In the Web server's root directory c. In a directory one level above the current page d. In the Web server's "ccyp" directory

c Note: In this example, the file named ccyp.html resides in a directory one level above the current page. The file path reference begins with two periods and a forward slash ( ../ ), which refer the page to a resource one directory above the location of the current page.

Consider the following HTML code from a page that resides on a Web server: <a href="/pages/index.html"> CCYP Home </a> According to this code, where does the file named index.html reside on the server? a. In the "pages" directory, which resides one directory beneath the directory currently being edited b. In the "CCYP" directory, which resides off of the server's root directory c. In the "pages" directory, which resides off of the server's root directory d. In the "home" directory, which resides off of the "pages" directory on the server

c Note: In this example, the file named index.html resides in the "pages" directory, which resides off of the Web server's root directory. The initial forward slash ( / ) instructs the browser to look for a directory named "pages" that is off of the root directory.

Consider the following HTML code: <a href="#targetArea1"> Top of the FAQ </a> Which of the following properly establishes the internal link anchor for the given code? a. <a id="#targetArea1"> <h1> FAQ </h1> </a> b. <a id=targetArea1> <h1> FAQ </h1> </a> c. <a id="targetArea1"> <h1> FAQ </h1></a> d. <a id="#Top of the FAQ"> <h1> FAQ </h1></a>

c Note: In this example, the following code creates the correct internal link anchor: <a id="targetArea1"> <h1> FAQ </h1> </a>. Creating an internal link requires two steps. You must first use the anchor element, <a>, with the id attribute to define an area as a target (the bookmark or anchor). Then, in another portion of the page, you create the link that points to the bookmark using the anchor element with the hypertext reference (href) attribute.

Your company's intranet Web server has crashed. You must help re-create the server. A server administrator has copied a CGI script from last night's backup tape. The server is an exact duplicate of the server that just crashed. However, this script will not process information on the new server. What is most likely the problem on the server? a. The Web server cannot support the script. b. The firewall is blocking the CGI script's transmissions. c. Executable permissions have not been set correctly. d. The script is responsible for the crash of the original Web server.

c Note: In this scenario, executable permissions have not been set correctly. As a result, the script cannot be executed by the Web server to process name=value pairs and thus enable the Web form.

Which of the following is a block-level element in HTML? a. <strong> b. <em> c. <p> d. <br>

c Note: The <p> element is a block-level element in HTML. Block-level elements affect an entire paragraph or multiple paragraphs of text on a Web page. Elements that can affect something as small as a character or a word are referred to as text-level elements. The <em>, <strong> and <br> elements are considered text-level elements.

Which statement most accurately describes the CSS "width" property used with the <table> element? a. It determines how far the table will extend vertically down the page. b. It determines how much space the content will occupy in a cell. c. It determines how far the table will extend horizontally across the page. d. It determines how much space exists between cells.

c Note: The CSS "width" property used with the <table> element determines how far the table will extend horizontally across the Web page. This property is most often used to control a table's size, regardless of the end user's screen size.

What is the basic element of a raw text string sent from a Web form to a Web server's CGI script? a. An action value b. An environment variable c. A name=value pair d. A method value

c Note: The basic element of a raw text string is a name=value pair. The name attribute of the <form> element organizes information input by the user into name=value pairs. The method and action attributes are associated with the <form> tag.

Consider the following HTML code: <a href="http://192.168.2.3/indexes/index.html"> CCYP Home </a> Which type of hyperlink reference is given in this code? a. Partial URL b. Secure site URL c. Fully qualified URL d. Relative URL

c Note: The given code references a fully qualified URL (also known as an absolute URL). A fully qualified URL is a URL that contains a full path to a resource, including the protocol indicator. Links are created with the anchor tag, <a>. Anchor tags are container tags that encompass the text or image (or both) to be used as the link. The href attribute is used to specify the link's hypertext reference, or the target of the link. You can specify a fully qualified URL or a relative URL (also called a partial URL) reference for any file, page or site.

Consider the following example code from a Web form: How often do you want to be updated about Habitat for Humanity? <select name="Frequency"> <option> Once a month </option> <option> Once a quarter </option> <option> Once a year </option> <option value="NotAtAll"> Never </option> </select> Which Web form field will this code create? a. A group of check boxes b. A group of radio buttons c. A single-select drop-down list d. A multiple-select drop-down list

c Note: The given code would create a single-option select list. To allow the user to select multiple options from the list, you must add the multiple="multiple" attribute and value to the <select> element.

You want to create a hyperlink to a secure resource that ensures information is properly encrypted. You also want this link's code to validate as HTML5. Which line of HTML code will accomplish this? a. <a href="http://www.company.com/mail"/> Visit Our Secure Site <a/> b. <a href=http://www.CIWcertified.com/secure> Visit Our Secure Site <secure/> c. <a href="ftps://www.CIWcertified.com"> Visit Our Secure Site </a> d. <a href=https://www.company.com/ssl> Visit Our Secure Site </href>

c Note: The link specifies a site using secure protocol, and the tag is properly closed. Links are created with the anchor element, <a>. Anchor elements are container tags that encompass the text or image (or both) to be used as the link. The href attribute is used to specify the link's hypertext reference, or the target of the link. Tech Note: Windows and UNIX/Linux systems use different naming conventions for their paths. Windows path names use back slashes, whereas UNIX/Linux paths use forward slashes. Also, Windows paths can use drive names (e.g., C:\), whereas Unix/Linux paths do not.

Which attribute of the <form> element is used to specify the way that user-entered Web form data will be sent to the Web server? a. The action attribute b. The get attribute c. The method attribute d. The post attribute

c Note: The method attribute of the <form> element specifies the method that the browser will use to send Web form data to a Web server. The method attribute takes two values: "get" and "post." The action attribute specifies the name and location of the CGI script used to process the form.

Selena needs to insert a comment in a Web page's code to ensure that other Web team members who work with the page code understand the nature of her changes. She wants to insert a comment that reads as follows: Modified by Selena Ramirez - for HTML compliance Selena wants this page to validate as HTML5 without any warnings or errors. She does not want the comment to appear to users when the page is displayed in a browser. Which line of code will achieve these two goals, assuming no other errors exist on the page? a. <--! Modified by Selena Ramirez - for HTML compliance --!> b. <// Modified by Selena Ramirez - for HTML compliance //> c. <!-- Modified by Selena Ramirez - for HTML compliance --> d. <-- Modified by Selena Ramirez - for HTML compliance -->

c Note: The proper way to insert a hidden comment into HTML code is to begin it with <!-- and end it with -->. The other methods will cause warnings to occur during validation. As a result, the improper entries might appear in some browsers or otherwise cause the page to display in unexpected ways.

You want to specify horizontal alignment for the content in a table row using a CSS property. Specifically, you want to move content over to the right. Which property and value pair would you use? a. vertical-align="right" b. text-align="justify" c. text-align="right" d. vertical-align="justify"

c Note: To horizontally align content over to the right in any table element, you would use the text-align CSS property with the "right" value. This property aligns text horizontally. Additional values for the text-align property include "left", "center" and "justify."

Consider the following HTML code: <blockquote> The Summer Youth Build allows students to help others while having fun on the job. <img src="syb/syb.png"/> </blockquote> You are using the proper HTML5 DOCTYPE declaration, but this code will not pass validation. The validation process returns a warning about the link to the image file. You change the <img> tag to the following: <img src="syb/syb.png" alt="Join a summer build!"/> Why is this change required to make your code validate? a. Because HTML5 requires you to provide the target page's name using the alt attribute b. Because HTML5 requires the alt attribute to locate the image by its alternative file name c. Because HTML5 requires the alt attribute to make image content accessible to all users d. Because HTML5 requires you to properly close the <img> tag

c Note: To make this code example validate as HTML5, you must change the image line of the code to read <img src="syb/syb.png" alt="Join a summer build!"/>, because HTML5 requires the alt attribute to be used with the <img> tag to make page content accessible to users who cannot view images for any reason. The alt attribute specifies alternative text to appear while the graphic is loading, or in place of the graphic in non-graphical browsers such as Lynx.

End users have complained that a link on your company's Web site does not work at all. You review the page with the suspect link and find the following HTML code: To learn more about Habitat, click the following link: <a src="http://www.habitat.org/getinv"> Learn more! </a> Which strategy will resolve the problem? a. Delete all quotation marks from the code. b. Move the </a> element so that it is immediately in front of the text that reads "Learn more." c. Use the correct attribute for referencing a resource. d. Properly close the <a> element.

c Note: To resolve the problem, you must use the correct attribute for referencing a resource, which is the href attribute, not the src attribute. Moving the </a> element would prevent the text "Learn more!" from appearing and behaving as a hyperlink because that text must be enclosed by the <a> element; this link is already properly closed. Quotation marks are required around the URL in order for hyperlink code to work properly. Once you use the correct attribute (href), the link will be valid.

You have added a table to your Web page consisting of two columns and five rows, including the header row. In the first header cell, you have set the height property in the CSS style sheet to 50 pixels. You have also mistakenly set the height property for the second header cell to 75 pixels. How tall will the header row be? a. 25 pixels b. 125 pixels c. 75 pixels d. 50 pixels

c Note: You can change the height or width of the table and individual cells by specifying pixel or percentage values using the height and width CSS properties, respectively. If you mistakenly set multiple values in multiple cells, the highest value will take precedence; the order of entries does not matter.

Which statement is true if you use a CSS style sheet to specify both an image and a color for the background in a Web page? a. The page will alternate appearing with the background color and the background image. b. The page will appear with no background. c. The background image will always render first. d. The background color will always render first.

c Note: You can specify both an image and a color for the background in a Web page. If you use a style sheet and specify both image and color as a background, then the background image will always render first. If the image cannot be found, a background color will then appear. All values specified in style sheets will override anything specified in the HTML itself.

Consider the following HTML code: <tr> <td>Bill Gates</td> Also consider the corresponding CSS document code: tr { vertical-align:top; } What does this code indicate about the text "Bill Gates?" a. The text "Bill Gates" appears in the top row of the column. b. The text "Bill Gates" appears in the top row of the column immediately below the header row. c. The text "Bill Gates" is vertically aligned to the top of the cell. d. The text "Bill Gates" is horizontally aligned to the top of the cell.

c Note: You use the CSS vertical-align property to specify vertical alignment. The code example sets the alignment of the entire row to "top", meaning that all cell content in that row will start at the top of the cell.

Your company Web site uses a Web form to collect data from a user. The user has entered data into the form fields and will soon click the Submit button, then the data will be sent to a database. Which of the following passes information from the Web form to the database server? a. A database b. An e-mail server c. A Perl script d. A CGI script

d Note: A CGI script passes information from the Web form to the database server. A CGI script can be created using various languages, from Perl to Java. However, a Perl script is not necessarily a CGI script. An e-mail server can be used during a CGI session, but it is not used to pass information from a Web server to a database. A database is the recipient of information received from the Web form; it is not used to pass information from the Web server to the database server.

Your Web team has been advised that the sales representatives receive a large number of questions from customers about a newly introduced marketing promotion. Which strategy should your team employ to help reduce customer's questions? This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9. a. Enable an e-commerce solution. b. Educate sales representatives about Web site capabilities. c. Determine the cause of the problem. d. Post a glossary or FAQ page.

d Note: A glossary or Frequently Asked Questions (FAQ) page on a Web site can provide end users with quick answers. Generally, the glossary or FAQ would be created or at least approved by sales and marketing. A glossary can provide a helpful navigation feature, especially if your site introduces concepts and terms to an audience that is unfamiliar with your practices. A glossary can also help index and catalog your site.

Consider the following HTML code: <table border="1"> <caption> Table Elements </caption> <tr> <th> Price <th> Quantity </tr> <tr> <td> 13.95 </td> <td class="center"> 72 </td> </tr> </table> This table did not render properly in the browser. Which step will solve the problem? a. Add a </td> tag after the words "Price" and "Quantity." b. Add a <tr/> tag after the words "Price" and "Quantity." c. Add a <th/> tag after the words "Price" and "Quantity." d. Add a </th> tag after the words "Price" and "Quantity."

d Note: Adding a </th> tag after the words "Price" and "Quantity" will solve the problem with this table. Each column in this table has a header, and each header must be declared with the <th> element by surrounding it with an opening <th> tag and a closing </th> tag. This table has two columns.

Consider the following HTML code: <th> Larry </th> <th> Moe </th> <th> Curly </th> Which statement about this code is accurate? a. It is part of a table with three data cells. b. It is part of a table with three captions. c. It is part of a table with three rows. d. It is part of a table with three columns.

d Note: Based on the code given, this table has three columns. The <th> element, or table header element, typically designates the top row or left column in a table. By default, the text in a header cell appears bold and centered. This table could have more or less than three rows, designated by the <tr> element, but the given code does not provide that information. A table usually has only one caption, designated by the <caption> element.

Consider the following code in a CSS document: h1 { font-family:arial, sans-serif; color:black; font-size:32 px; } Why will this code not render properly in a Web browser? a. Because arial is a serif font. b. Because the font-size property of the h1 heading style cannnot be modified from its default value of 16 pixels. c. Because the size of text must be specified in inches, not pixels. d. Because there is a space between the number and the abbreviation in the font-size property.

d Note: CSS allows you to change the size of text. The font-size property takes values in pixels. The font-size value is specified with the "px" abbreviation for "pixels." No spaces can exist between the number value and the abbreviation. For example, font-size=16 px would not render properly, but font-size=16px (with no space) would work correctly.

You want to create an internal hyperlink in your Web page. Which choice describes the two steps you must perform? a. Create an anchor that links to the current page, then create a link that refreshes the page. b. Create a table, then create a link to the top of the table. c. Create an external link to a "dummy" page, then link that page to the internal link. d. Create an anchor, then create a link that points to the anchor.

d Note: Creating an internal link requires two steps. You must first use the anchor element, <a>, with the id attribute to define an area as a target (the bookmark or anchor). Then, in another portion of the page, you create the link that points to the bookmark using the anchor element with the hypertext reference (href) attribute.

You use the W3C Link Checker program to automatically check your site's hyperlinks. Why is it advisable to check hyperlinks manually at times? a. Because programs such as the W3C Link Checker are known to contain "bugs" that cause unreliable results b. Because automatic link-checking software does not work with HTML5 documents c. Because automatically checking links on Web pages often overwhelms the server at peak usage times during the day d. Because even if a link is valid, content on either the target page or the page with the link might have changed

d Note: Even if you use automatic link-checking software, it is advisable to check your hyperlinks manually as well. Although a link may still be valid, the content of either the target page or the page with the link can change in ways such that a link is no longer relevant or appropriate.

Consider the following Cascading Style Sheets (CSS) rule: body {background-color:lightblue;} Which is the "selector" portion of this rule? a. The portion inside the braces b. The portion that reads "lightblue" c. The portion that reads "background-color" d. The portion that reads "body"

d Note: In the example Cascading Style Sheets (CSS) rule given, the portion that reads "body" is the selector. The portion inside of the braces is called the declaration. The portion that reads "background-color" is called the property, and the portion that reads "lightblue " is called the value.

Which attribute can you include in your HTML code to enable sight-impaired users and users with text-only browsers to understand the graphical image content in your Web page? a. The img attribute b. The text attribute c. The src attribute d. The alt attribute

d Note: The alt attribute of the <img> element specifies alternative text to appear while the image is loading, or in place of the image in non-graphical browsers such as Lynx. The alt attribute is also used by browsers for sight-impaired users; the browser will repeat the wording found in the alt attribute. This alternative text will also display if the image fails to load or if the user has configured his or her browser not to display images. The src attribute of the <img> element is used to specify the name and location of an image file.

Consider the following HTML code on a page that resides on a Web server: <a href="pages/index.html"> CCYP Home </a> According to this code, where does the file named index.html reside on the Web server? a. In the "home" subdirectory, which resides off of the "pages" directory on the server b. In the "pages" directory, which resides above the page being currently edited c. In the Web server's root directory d. In the "pages" subdirectory, which resides beneath the page being currently edited

d Note: In this example, the file named index.html resides in the "pages" directory, which resides beneath the page currently being edited. Notice that there is no initial forward slash ( / ) in the file path. As a result, the link instructs the page to look for index.html in a subdirectory immediately below the current location. If a forward slash had been included before "pages" in the path, then the file would reside in a directory named "pages" that is off of the root directory.

Consider the following code: <a id="targetArea1"> <h1>FAQ</h1> </a> Which of the following lines of HTML code will create a link to the text that reads "FAQ"? a. <a href="#h1"> Top of the FAQ </a> b. <a href="#FAQ"> Top of the FAQ </a> c. <a href="targetArea1"> Top of the FAQ </a> d. <a href="#targetArea1"> Top of the FAQ </a>

d Note: In this example, the following code will create a link to the text that reads "FAQ": <a href="#targetArea1"> Top of the FAQ </a>. To create an internal link, you must specify the name of the internal link with the hash symbol ( # ) as a value to the href attribute of the <a> tag. The hash tells the browser to look for an anchor by this name within the current document. Without this hash, the browser will look for an external file by that name.

End users have complained that when they click a link on your company's Web site, the wrong client loads. You review the page with the suspect link and find the following HTML code: To begin an FTP session, click the following link: <a href="http://ftp.habitat.org"> FTP Session </a> What is the problem? a. An FTP server has been specified. b. The Web server is not running. c. The FTP server is not running. d. A Web server has been specified.

d Note: In this example, the problem is that a Web server has been specified in the hyperlink code instead of an FTP server. Even though the link references a system named ftp.habitat.org, the URL specifies http://, which means that any browser will search for a Web service (HTTP), and not an FTP service.

A user has accessed your company's Web server with her Web browser. Which choice lists the necessary elements for a CGI session to occur in this scenario? a. A Web form and a database server b. A CGI script, a Web form, and a database server c. A Web form, a Web server with a CGI interpreter, and a separate database server d. A CGI script, a Web form, and a Web server with a CGI interpreter

d Note: In this scenario, the necessary elements for a CGI session to occur are a CGI script, a Web form, and a Web server with a CGI interpreter. Although most Web forms will load data into a database, you do not necessarily need a separate database server. Data can be sent to a database on the same Web server, for example. You do not even necessarily need to send information to a database server, because the information could be sent via e-mail to the appropriate parties without being sent to a database.

You want to create a hyperlink to a secure resource that ensures information is properly encrypted. Which line of HTML code will accomplish this? a. <a href="http://www.company.com/mail"/> Visit Our Secure Site <a/> b. <a href="http://www.CIWcertified.com/secure"> Visit Our Secure Site </secure> c. <a href="https://www.company.com/ssl"> Visit Our Secure Site <href/> d. <a href="https://www.CIWcertified.com"> Visit Our Secure Site </a>

d Note: Of the links given, only the following is properly formed and links to a site that encrypts information: <a href="https://www.CIWcertified.com"> Visit Our Secure Site </a>. The link specifies a site using secure protocol. Links are created with the anchor element, <a>. Anchor elements are container tags that encompass the text or image (or both) to be used as the link. The href attribute is used to specify the link's hypertext reference, or the target of the link.

Which line of HTML code creates a valid hyperlink on a Web page? a. <a href="ftp://ftp.company.com"> Download now <ftp/> b. <a href="https://www.company.com/ssl"> Secure Server <href> c. <a href="http://www.company.com/mail"/> Contact us now <a/> d. <a href="mailto:[email protected]"> Contact us now </a>

d Note: Of the links given, only the following is properly formed: <a href="mailto:[email protected]"> Contact us now </a>. This code links an end user to a pre-addressed e-mail message. The link specifies a protocol, and the element is properly closed. Links are created with the anchor element, <a>. Anchor elements are container tags that encompass the text or image (or both) to be used as the link. The href attribute is used to specify the link's hypertext reference, or the target of the link.

Which of the following is an HTML phrase element that formats text in a fixed-width font? a. <dfn> b. <em> c. <var> d. <samp>

d Note: The <samp> element is a phrase element in HTML that formats text in a fixed-width font for display on Web pages. The <em>, <dfn> and <var> elements make Web page text appear in italic type.

What is the purpose of the <link> tag in an HTML document? a. To create a link to a database b. To create a link to the home page c. To create a link to another location on the same page d. To create a link to a style sheet

d Note: The HTML <link> tag is used to link a Web page to a style sheet document. To create external and internal hyperlinks, you would use the <a> tag. Database links are most often made using a scripting technology, such as PHP, Perl or .NET.

d Note: The Portable Network Graphics (PNG) format supports compression, animation and transparency. PNG is also an open standard. However, it is not supported in older browsers. Graphics Interchange Format (GIF) 89a supports animation and transparency, and is supported in older browsers. Joint Photographic Experts Group (JPEG) supports compression but not animation or transparency. The Bitmap (BMP) format is not a universally supported Web image file type.

d Note: The Portable Network Graphics (PNG) format supports compression, animation and transparency. PNG is also an open standard. However, it is not supported in older browsers. Graphics Interchange Format (GIF) 89a supports animation and transparency, and is supported in older browsers. Joint Photographic Experts Group (JPEG) supports compression but not animation or transparency. The Bitmap (BMP) format is not a universally supported Web image file type.

You used the following hexadecimal code to specify a background color: CC08FB Which characters in this code represent the blue value? a. 08 b. CB c. CC d. FB

d Note: The characters FB represent the blue value in the hexadecimal color code CC08FB. Colors are often specified in terms of their RGB (Red Green Blue) values, with two characters each specifying the red value, then the green value, then the blue value. A monitor screen mixes light, and the mixture of red, green and blue light produces white, which is the presence of all colors. Black is the absence of all colors. Colors are specified in RGB values ranging from 0 to 255. The hexadecimal value FF represents 255. Therefore, the hexadecimal value #FFFFFF represents the highest possible value for all three RGB colors, producing white. The hexadecimal value #000000 represents the absence of all colors, or black.

Which <form> element attribute and value specify that the browser will send data to the Web server location specified by a URL? a. action="get" b. action="post" c. method="get" d. method="post"

d Note: The method attribute of the <form> tag specifies the way in which form data submitted by the user will be sent to the Web server, and the "post" value specifies that data will be sent or posted to a specified URL. The "get" value would append form data to the URL. The action attribute specifies the name and location of the CGI script used to process the form.

You want to specify vertical alignment for the content in a table row using a CSS property. Specifically, you want to move content down to the lowest point in the cell. Which property and value pair would you use? a. text-align="bottom" b. text-align="justify" c. vertical-align="justify" d. vertical-align="bottom"

d Note: To vertically align content down to the lowest point in any table element, you would use the vertical-align CSS property with the "bottom" value. This property aligns content vertically. Additional values for the vertical-align property include "top" and "middle". The text-align property aligns text horizontally.

Many Web designers try to control the way that Web page elements will render on the screen. A designer who uses a fixed-width layout: a. ensures that the page elements will change dynamically depending on the size of the browser window. b. ensures that the page elements will render consistently when users change the size of their browser windows. c. assigns percentage values to page elements using HTML5 structural elements. d. assigns specific pixel widths to page elements using HTML5 structural elements.

d Note: Web designers have no control over their site visitors' browser window sizes, the Web browsers used or the fonts installed on visitors' computers. Yet despite this, many designers try to control the way that Web page elements will render on the screen. Designers who choose the fixed-width layout method assign specific pixel widths to elements using HTML5 structural elements or the <div> tag. This layout ensures that the text, images and layout will not vary from browser to browser. The problem with using a fixed-width layout is that the elements may not render as expected when users change the size of their browser windows.

Many Web designers try to control the way that Web page elements will render on the screen. A designer who uses a liquid layout: a. can assign percentage values to elements without the need to use HTML5 structural elements. b. assigns specific pixel widths to page elements using HTML5 structural elements. c. ensures that the text, images and layout will not vary from browser to browser. d. ensures that the page elements will change dynamically depending on the size of the browser window.

d Note: Web designers have no control over their site visitors' browser window sizes, the Web browsers used or the fonts installed on visitors' computers. Yet despite this, many designers try to control the way that Web page elements will render on the screen. Designers who choose the liquid layout method assign percentage values to elements. With this layout, the size of an element is flexible and will change dynamically depending on the size of the browser window. For example, you can specify in the CSS width property that Element A will occupy 35 percent of the screen and Element B will occupy the remaining 65 percent. If the user resizes the browser window, the elements will resize correspondingly.

Which line of HTML code creates a multiple-option select list in a Web form? a. <input type="select" name="work" multiple="multiple" size="4"/> b.<select multiple="selectlist" name="work" size="4"> c. <input type="select" name="work" multiple="yes" size="4"/> d. <select name="work" multiple="multiple" size="4">

d Note: You would use the <select> element with the name, multiple, and size attributes. The name attribute can be any name that you want to use for your CGI purposes. The multiple attribute must use "multiple" as its value. The size attribute determines the number of options that will appear exposed for the end user when the page is first loaded. The end user can then scroll down to see additional options. The <select> tag is a container tag that must enclose other elements, thus it is not closed with a slash at the end.

You have added an image to your Web page using the following code: <img src="family.png" height="100" width="150"/> When you load the Web page in a browser, the image appears distorted. All the people's faces in the image appear elongated. What can you do to resolve this problem? a. Use an image in JPEG format. b. Change the image-rendering features in the browser. c. Use an image in GIF format. d. Alter the value for the height attribute.

d. Note: In this scenario, altering the value for the height attribute will resolve the problem of an elongated image in your Web page. Changing the image format will not resolve this issue, nor will changing image-rendering browser features. If you are uncertain of the original dimensions of your image, you can ensure that the size will change proportionately by specifying either the height or the width; the other measurement will be calculated proportionately based on the original image size.


Set pelajaran terkait

ATI PN Maternal Newborn Online Practice 2020 A with NGN

View Set

Chapter 1: Personal Property vs. Real Property

View Set

Chapter 39: Assessment of Musculoskeletal Function - ML4

View Set

Microeconomics 1041 James Mizzou- Final

View Set

Motivation and emotion: chapter 9

View Set