OA Exams

  • web.groovymark@gmail.com
  • December 14, 2024

Question 01

Which HTML element is used to create a hyperlink?

a) <link>
b) <a>
c) <href>
d) <anchor>

Correct Answer: b) <a>

Explanation: The <a> element is used to create hyperlinks in HTML, allowing users to navigate to other web pages or resources.

Question 02

What attribute is required to specify the URL of a hyperlink?

a) src
b) link
c) href
d) alt

Correct Answer: c) href

Explanation: The href attribute specifies the destination URL for the hyperlink created by the <a> tag.

Question 03

Which HTML5 element is used to create a table cell containing data?

a) <td>
b) <th>
c) <tr>
d) <table>

Correct Answer: a) <td>

Explanation: The <td> element is used to define table cells that contain data in an HTML table.

Question 04

Which tag is used to group table header, body, and footer content in HTML?

a) <tbody>
b) <tfoot>
c) <thead>
d) All of the above

Correct Answer: d) All of the above

Explanation: The <thead>, <tbody>, and <tfoot> tags group content for the header, body, and footer sections of a table.

Question 05

Which HTML element is used to define a block of navigation links?

a) <nav>
b) <header>
c) <section>
d) <aside>

Correct Answer: a) <nav>

Explanation: The <nav> element defines a section of navigation links within a webpage.

Question 06

Which attribute is used to associate a <label> with a form control?

a) for
b) id
c) name
d) value

Correct Answer: a) for

Explanation: The for attribute links a label with a form control by matching the id of the form control.

Question 07

Which HTML attribute is used to specify an alternative text for images if the image fails to load?

a) title
b) src
c) alt
d) description

Correct Answer: c) alt

Explanation: The alt attribute provides alternative text for images, helping improve accessibility and SEO.

Question 08

Which HTML element is used to group related form controls and labels?

a) <form>
b) <fieldset>
c) <section>
d) <div>

Correct Answer: b) <fieldset>

Explanation: The <fieldset> element groups related form controls and their labels, often with a border around them.

Question 09

Which tag is used to define an ordered list in HTML?

a) <ul>
b) <ol>
c) <li>
d) <list>

Correct Answer: b) <ol>

Explanation: The <ol> tag is used to define an ordered (numbered) list, while <li> defines each list item.

Question 10

What is the correct HTML element to define a paragraph?

a) <p>
b) <para>
c) <div>
d) <section>

Correct Answer: a) <p>

Explanation: The <p> element defines a paragraph in HTML, used to separate blocks of text.

Question 11

Which attribute specifies the media type (screen, print, etc.) in a <link> tag for stylesheets?

a) media
b) type
c) rel
d) mode

Correct Answer: a) media

Explanation: The media attribute specifies which media type the linked stylesheet applies to, such as screen or print.

Question 12

Which HTML tag is used to display a horizontal line across the page?

a) <line>
b) <hr>
c) <br>
d) <border>

Correct Answer: b) <hr>

Explanation: The <hr> tag is used to create a horizontal rule or line to visually separate content.

Question 13

Which tag is used to define a citation in HTML?

a) <cite>
b) <q>
c) <quote>
d) <blockquote>

Correct Answer: a) <cite>

Explanation: The <cite> tag is used to reference the title of a work, such as a book or article.

Question 14

Which HTML5 tag is used to embed an external resource like a webpage or a media player?

a) <embed>
b) <iframe>
c) <object>
d) <media>

Correct Answer: b) <iframe>

Explanation: The <iframe> tag embeds external content, such as another webpage, into the current webpage.

Question 15

Which CSS property is used to create space between the border of an element and its content?

a) margin
b) padding
c) border-spacing
d) outline

Correct Answer: b) padding

Explanation: The padding property creates space between the content of an element and its border.

Question 16

What CSS property is used to hide an element from the webpage while maintaining its space?

a) visibility
b) display
c) opacity
d) z-index

Correct Answer: a) visibility

Explanation: The visibility property hides the element from view but still maintains the element’s layout space.

Question 17

Which CSS property is used to specify the amount of space between grid columns?

a) column-gap
b) grid-gap
c) grid-template-columns
d) padding

Correct Answer: a) column-gap

Explanation: The column-gap property defines the space between grid columns in a grid layout.

Question 18

What is the default value for the CSS position property?

a) absolute
b) relative
c) static
d) fixed

Correct Answer: c) static

Explanation: The default position value in CSS is static, meaning elements are positioned according to the normal document flow.

Question 19

Which CSS property is used to change the color of text?

a) background-color
b) font-color
c) text-color
d) color

Correct Answer: d) color

Explanation: The color property is used to set the text color in CSS.

Question 20

Which CSS property controls the font size of text?

a) font-style
b) font-weight
c) font-size
d) text-size

Correct Answer: c) font-size

Explanation: The font-size property controls the size of the text.

Complete the Captcha to view next question set.

Tags

Prev Post
WGU D276 Practice Exam Questions – Set 5 – Part 2
Next Post
WGU D276 Practice Exam Questions – Set 4 – Part 3