WITH 100% CORRECT ANSWERS
Which HTML elements can be floated right or left on the page? - ANS-Many elements, including both the
<div> and <img> elements.
What is the purpose of clearing a float? - ANS-To display the next content below the floated content.
If we floated one div to the right and another to the left, where would the next page content display on
the page? - ANS-In between the two divs, but only if there is sufficient space
If a div has a defined width of 200px, a border of 5px, padding of 10px, and a margin of 5px, what would
be the overall width taken up by the div element on the screen? - ANS-240px
If we applied the CSS style {padding: 10px 0px;} to a div element, what would happen? - ANS-10 pixels of
padding would be added to the top and bottom of the div.
Going from the outside in, what is the order of components in the box model? - ANS-Margin, border,
padding, content
If a CSS class and a CSS ID are both assigned to the same page element, and each specifies a different
text color, which of the styles will apply? - ANS-The ID style will be applied.
How can setting table column widths by percent hold an advantage over setting them by pixels? - ANS-If
the overall table width is modified, the column widths will be modified in the same proportion.
Which CSS property sets the background color for an HTML element, such as a table row? bg: - ANS-
background-color:
Click on the image above.Write a single CSS shorthand statement that would accomplish the same as
the following three CSS lines: - ANS-border: 3px solid red;
Why is it a bad idea to name a class "underline"? - ANS-Class names should reflect meaning and not
describe appearance.
Click on the image above to show a line of HTML code. Assuming NO CSS styling has been declared, how
will the following display on the screen? - ANS-The word 'first' will display the same as the other text.
What will happen if we try to apply more than one class to the same, specific HTML element? - ANS-The
styles from all the classes will be combined and applied.