HTML and CSS Reference
In-Depth Information
Which of the following aligns text to the full width of the available box?
A. right
B. full
C. center
D. justify
3. Which of the following is a way to configure the amount of space between words?
A. word-margin
B. letter-margin
C. word-spacing
D. word-padding
Objective 4.2: Style HTML box properties
Every HTML element has box properties. These are the properties that control how the
element is spaced on the page and control the position of the box contents. In addi-
tion, the graphic effects can be applied to the box of an element.
This objective covers how to:
Apply styles to alter appearance attributes
Apply styles to alter graphic effects
Apply styles to establish and change an element's position
Applying styles to alter appearance attributes
There are a variety of ways to alter the appearance of a box as it applies to an HTML element.
This section demonstrates how to alter the appearance by changing the attributes related to
size, bordering, outlining, padding, and margin.
Altering the size
The size of any element is controlled by its height and width properties. These can be set on
any object or class in CSS. By default, an object will size itself to be able to display its contents.
So, a div element with some text inside it will have a width and height that is sufficient to
display the text. The size can be changed by setting a value for the width and/or height . The
width and height can be specified as a measurement in pixels (px) or centimeters (cm) or
can be specified as a percentage of its parent element. For example, the following code will
set the width of a table to be 50 percent of its parent container, which in this case is just the
window object.
Search WWH ::

Custom Search