Site Development Associate 2.02 Review Flashcards
The HTML tag, which defines the coordinates of an image map, uses which of the following attributes?
Answer:
href
Attributes of the tag include href, alt and shape. The name attribute is contained within the tag and provides a reference name for the image map. The “rect” value (as well as “circle” and “poly”) can be used with the shape attribute.
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?
Answer:
.<hr style>
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.
Consider the following HTML code:
.<blockquote>
The Summer Youth Build allows students to help others while having fun on the job.
.<img></img>
.</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></img> tag to the following:
.<img></img>
Why is this change required to make your code validate?
Answer:
Because HTML5 requires the alt attribute to make image content accessible to all users
To make this code example validate as HTML5, you must change the image line of the code to read .<img></img>, because HTML5 requires the alt attribute to be used with the .<img></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.
Which container tag specifies a name for an image map and encloses empty tags that define the regions of the image map?
Answer:
The container tag specifies a name for the image map. This name is also used in the .<img></img> tag to apply the map to the correct image. The tags contain the empty tags, which define coordinates, shapes and hyperlinks for the image map.
To insert a graphic in a Web page and successfully validate the page as HTML5, what must you include with the .<img></img> element?
Answer:
The alt attribute
Most images used in HTML5 are required to contain the alt attribute with a corresponding value to avoid a code validation error. The src attribute specifies is also required for the .<img></img> element, but it is spelled src, not source. The id attribute specifies a unique id for the .<img></img> element. The name attribute on the .<img></img> element is deprecated; W3C suggests using the id attribute instead.
You are updating a Web site for a customer’s small business. The customer wants you to add all new images on the site to refresh it, but wants to use mostly stock photography to provide a more professional look and feel. What does a royalty-free license allow you to do with the stock images in a Web site?
Answer:
Use the images without paying a fee for each use
A royalty-free license allows the purchaser to use an image without having to pay a royalty each time the image is used. Royalty-free does not imply that the image is free to use without purchasing a license or that the purchaser may resell or transfer the image. The photographer who took the photo retains the original copyright.
Which elements of an image can be made transparent?
Answer:
Any element of a specified color
Any element in an image that is a single specific color can be made transparent, provided that the image file format supports image transparency. These formats are GIF 89a and PNG.
When you scan an image from a print source, the scanner:
Answer:
creates a digital image that you can save and then edit.
You can use a scanner to scan images from a print source. The print source can be a photo, paper document, book, magazine, map or three-dimensional object (as long as it does not have a lot of depth; for example, a coin could be scanned). Unlike a photocopy machine that creates a paper hard copy of the scanned item, a scanner creates a digital image in memory that you can save and then edit with an image-creation or photo-management software application. You can create image layers only when you use an image-creation application to create images. Scanned images are bitmap graphics, not vector.
When creating an image map on a Web page, in which HTML tag would you place the target URL for a hyperlink?
Answer:
In an image map, a target URL is specified as the href attribute value in the tag.