EXAM 180 ACTUAL QUESTIONS AND CORRECT VERIFIED
ANSWER WITH RATIONALE ALREADY GRADED A+
This 180-question WGU C799 Web Development Foundations exam bank
provides a comprehensive review of core web development concepts. Each
question includes a realistic technical scenario, four distinct multiple-choice
options, a correct answer, and a detailed rationale explaining the underlying
HTML syntax, CSS styling, layout behavior, or JavaScript functionality.
Topics cover semantic HTML5 elements, CSS box model, flexbox and grid
layouts, responsive design, positioning, typography, forms, tables, multimedia,
transitions, animations, accessibility, and best practices. The bank emphasizes
syntax accuracy, property purposes, selector specificity, and layout control.
No question duplicates another in stem, answers, or technical context.
1 When developing a Web site, which of the following actions would be
considered unethical?
A) Borrowing music from another site with the owner's written permission
B) Creating new code that provides a look and feel similar to another site
C) Linking your site to another site with permission
D) Copying some code from another Web site
Answer: D
Rationale: Copying code from another website without permission is a form of
copyright infringement and is considered unethical. Borrowing music with written
permission, creating new code that mimics a look and feel, and linking with
permission are all acceptable practices that respect intellectual property rights.
2 When you are using stock images in your Web site, a royalty-free license allows
you to:
A) Use the image without paying any fees
B) Use the image multiple times without paying additional fees after the initial
purchase
C) Claim ownership of the image
D) Resell the image to other users
Answer: B
,Rationale: A royalty-free license means that after you pay the initial license fee,
you can use the image multiple times without paying additional royalties. It does
not mean the image is free (no cost), nor does it transfer ownership or allow resale
of the image itself.
3 Which HTML tag is used to create a hyperlink to another web page?
A) <link>
B) <a>
C) <href>
D) <url>
Answer: B
Rationale: The <a> (anchor) tag is used to create hyperlinks in HTML. The href
attribute within the <a> tag specifies the destination URL. The <link> tag is used
for linking external resources like stylesheets, and <href> and <url> are not valid
HTML tags.
4 What does CSS stand for?
A) Creative Style Sheets
B) Cascading Style Sheets
C) Computer Style Sheets
D) Colorful Style Sheets
Answer: B
Rationale: CSS stands for Cascading Style Sheets. It is a stylesheet language used
to describe the presentation of a document written in HTML or XML. The term
"cascading" refers to the priority scheme used to resolve conflicting style rules.
5 Which HTML element defines the title of a web page that appears in the browser
tab?
A) <head>
B) <title>
C) <header>
D) <meta>
Answer: B
Rationale: The <title> element, placed inside the <head> section, defines the title
of the web page. This title appears in the browser tab, search engine results, and
bookmarks. The <head> contains metadata but does not itself define the title, and
<header> is a semantic structural element.
6 What is the correct CSS syntax to change the text color of all paragraph elements
to blue?
,A) p {text-color: blue;}
B) p {color: blue;}
C) p {font-color: blue;}
D) p {text: blue;}
Answer: B
Rationale: The correct CSS property to change text color is "color". The syntax is
selector {property: value;}, so p {color: blue;} correctly targets all paragraph
elements. "text-color" and "font-color" are not valid CSS properties.
7 Which HTML attribute is used to specify an alternate text for an image if it
cannot be displayed?
A) src
B) alt
C) title
D) href
Answer: B
Rationale: The alt attribute provides alternative text for an image if it cannot be
displayed. This is important for accessibility (screen readers) and for search engine
optimization. The src attribute specifies the image source, title provides tooltip
text, and href is used for links.
8 Which CSS property is used to change the background color of an element?
A) background-color
B) bgcolor
C) color
D) background
Answer: A
Rationale: The background-color property is used to set the background color of an
element in CSS. The bgcolor attribute is deprecated in HTML. The color property
sets text color, and the background property can be used but is a shorthand for
multiple background-related settings.
9 What is the primary purpose of a web browser?
A) To edit HTML code
B) To render and display web pages
C) To store web page files
D) To manage web server databases
Answer: B
Rationale: A web browser's primary purpose is to request web pages from servers
and render them for display, interpreting HTML, CSS, and JavaScript. Editing
, code, storing files, and managing databases are tasks performed by other tools and
servers.
10 Which HTML tag is used to create an unordered list?
A) <ol>
B) <ul>
C) <li>
D) <list>
Answer: B
Rationale: The <ul> tag defines an unordered (bulleted) list. The <ol> tag defines
an ordered (numbered) list. The <li> tag defines a list item within either type of
list. The <list> tag is not valid HTML.
11 What is the function of the HTTP protocol in web development?
A) To define the structure of web pages
B) To transfer files between a web server and a web browser
C) To style web pages
D) To store session data
Answer: B
Rationale: HTTP (Hypertext Transfer Protocol) is the protocol used to transfer
hypertext requests and information between web servers and browsers. HTML
defines structure, CSS defines styling, and session data is stored via cookies or
server-side sessions.
12 Which CSS selector is used to select an element by its ID?
A) .idname
B) #idname
C) *idname
D) idname
Answer: B
Rationale: In CSS, the hash symbol (#) is used to select an element by its ID
attribute. The period (.) is used for class selectors. The asterisk (*) is a universal
selector, and a plain name selects by element type.
13 What is the correct HTML for inserting an image?
A) <image src="photo.jpg" alt="text">
B) <img src="photo.jpg" alt="text">
C) <img href="photo.jpg" alt="text">
D) <picture src="photo.jpg" alt="text">
Answer: B