OA Exams

  • California, TX 70240
  • Info@gmail.com
  • Office Hours: 8:00 AM – 7:45 PM
  • web.groovymark@gmail.com
  • December 14, 2024

Question 01

Which CSS property is used to change the background color of an element?

a) color
b) background-color
c) bgcolor
d) border-color

Correct Answer: b) background-color

Explanation: The background-color property is used to specify the background color of an HTML element.

Question 02

How do you display hyperlinks without an underline in CSS?

a) a {text-decoration:none;}
b) a {underline:none;}
c) a {decoration:none;}
d) a {no-underline:true;}

Correct Answer: a) a {text-decoration:none;}

Explanation: The text-decoration:none CSS rule removes the default underline from hyperlinks.

Question 03

Which CSS property controls the text size of an element?

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

Correct Answer: a) font-size

Explanation: The font-size property controls the size of the text inside an HTML element.

Question 04

Which CSS property is used to make text bold?

a) font-style:bold
b) font-weight:bold
c) font-size:bold
d) font:bold

Correct Answer: b) font-weight:bold

Explanation: The font-weight property is used to make text bold in CSS.

Question 05

How do you make each word in a text start with a capital letter in CSS?

a) text-capital:each
b) text-transform:capitalize
c) text-transform:uppercase
d) text-decoration:capitalize

Correct Answer: b) text-transform:capitalize

Explanation: The text-transform:capitalize property makes the first letter of each word uppercase.

Question 06

Which CSS property changes the font of an element?

a) font-family
b) font-style
c) font-text
d) font-change

Correct Answer: a) font-family

Explanation: The font-family property specifies the font of an HTML element.

Question 07

Which CSS property is used to change the left margin of an element?

a) padding-left
b) margin-left
c) left-margin
d) margin

Correct Answer: b) margin-left

Explanation: The margin-left property adjusts the left margin of an HTML element.

Question 08

True or False: Negative values can be used when specifying padding in CSS.

a) True
b) False

Correct Answer: b) False

Explanation: Padding in CSS cannot have negative values, only positive values are allowed

Question 09

How do you select an element with the ID demo in CSS?

a) .demo
b) #demo
c) demo
d) div.demo

Correct Answer: b) #demo

Explanation: The #demo selector is used to target an element by its ID in CSS.

Question 10

How do you select all elements with the class name test in CSS?

a) #test
b) *test
c) .test
d) test

Correct Answer: c) .test

Explanation: The .test selector is used to target all elements with the class name test in CSS.

Question 11

How do you group multiple selectors in CSS?

a) Use a space between selectors
b) Use a plus symbol between selectors
c) Use a comma between selectors
d) Use a period between selectors

Correct Answer: c) Use a comma between selectors

Explanation: Grouping multiple selectors with a comma allows the same CSS rule to apply to all specified elements.

Question 12

What is the default value of the CSS position property?

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

Correct Answer: d) static

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

Question 13

Which HTML element is used to define strong importance text?

a) <strong>
b) <em>
c) <b>
d) <mark>

Correct Answer: a) <strong>

Explanation: The <strong> tag is used to define text that is of strong importance, often rendering in bold.

Question 14

How do you add a comment in CSS?

a) // this is a comment
b) <!– this is a comment –>
c) /* this is a comment */
d) # this is a comment

Correct Answer: c) /* this is a comment */

Explanation: Comments in CSS are written inside /* ... */ and are ignored by the browser.

Question 15

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

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

Correct Answer: a) color

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

Question 16

How do you set a background image in CSS?

a) background-image:img(‘image.gif’);
b) background:src(‘image.gif’);
c) background-image:url(‘image.gif’);
d) background-image(‘image.gif’);

Correct Answer: c) background-image:url('image.gif');

Explanation: The background-image property is used to set a background image for an element in CSS.

Question 17

Which CSS property is used to set the width of an element’s border?

a) border-size
b) border-width
c) border
d) border-style

Correct Answer: b) border-width

Explanation: The border-width property sets the thickness of the border around an element.

Question 18

How do you add a shadow to text in CSS?

a) text-shadow
b) font-shadow
c) shadow-text
d) text-box-shadow

Correct Answer: a) text-shadow

Explanation: The text-shadow property adds shadow effects to text in CSS.

Question 19

What is the CSS property that controls the horizontal alignment of a block element?

a) align-content
b) text-align
c) justify-content
d) float

Correct Answer: b) text-align

Explanation: The text-align property is used to specify the horizontal alignment of inline content within a block-level element.

Question 20

Which CSS property controls the visibility of an element?

a) display
b) visibility
c) opacity
d) overflow

Correct Answer: b) visibility

Explanation: The visibility property is used to control whether an element is visible or hidden on the page.

Complete the Captcha to view next question set.

Tags

Prev Post
WGU D357 Practice Exam Questions – Set 4 – Part 2
Next Post
WGU D368 Practice Exam Questions – Set 3 – Part 2