Site Development Associate 2.01 Review Flashcards
Consider the following HTML code:
Bill Gates
Also consider the corresponding CSS document code:
.tr
.{
.vertical-align:top;
.}
What does this code indicate about the text “Bill Gates?”
Answer:
The text “Bill Gates” is vertically aligned to the top of the cell.
You use the CSS vertical-align property to specify vertical alignment. The code example sets the alignment of the entire row to “top”, meaning that all cell content in that row will start at the top of the cell.
Consider the following HTML code from a page that resides on a Web server:
.<a> CCYP Home </a>
According to this code, where does the file named index.html reside on the server?
Answer:
In the “pages” directory, which resides off of the server’s root directory
In this example, the file named index.html resides in the “pages” directory, which resides off of the Web server’s root directory. The initial forward slash ( / ) instructs the browser to look for a directory named “pages” that is off of the root directory.
You want to specify vertical alignment for the content in a table row using a CSS property. Specifically, you want to move content down to the lowest point in the cell. Which property and value pair would you use?
Answer:
.vertical-align=”bottom”
To vertically align content down to the lowest point in any table element, you would use the vertical-align CSS property with the “bottom” value. This property aligns content vertically. Additional values for the vertical-align property include “top” and “middle”. The text-align property aligns text horizontally.
Consider the following HTML code on a page that resides on a Web server:
.<a> CCYP Home </a>
According to this code, where does the file named index.html reside on the Web server?
Answer:
the “pages” subdirectory, which resides beneath the page being currently edited
In this example, the file named index.html resides in the “pages” directory, which resides beneath the page currently being edited. Notice that there is no initial forward slash ( / ) in the file path. As a result, the link instructs the page to look for index.html in a subdirectory immediately below the current location. If a forward slash had been included before “pages” in the path, then the file would reside in a directory named “pages” that is off of the root directory.
Which address instructs the browser to look for a directory named mysite that exists one level higher than the page you are currently viewing?
Answer:
../mysite/index.html
The initial two periods and forward slash ( ../ ) instruct the browser to look for a directory named mysite that begins one level higher than the page you are currently viewing: ../mysite/index.html.
You want to create a table in which the top row spans three columns. Which tag would accomplish this goal?
Answer:
To create a table in which the top row spans three columns, you would use the colspan attribute with the element. You can use the rowspan or colspan attribute with the element, but in this example you want to apply the spanning to the header row. You would not use the rowspan or colspan attribute with the element.
Consider the following portion of HTML code for creating a table:
Price
Quantity
13.95
72
Also consider the corresponding CSS document code:
table, td, th { border:1px solid gray; } td, th { padding:6px; border-spacing:2px; }
Which statement correctly describes the resulting table?
Answer:
Each cell in the table will be separated from the other cells by 2 pixels more than the default.
Each cell in the table will be separated from the other cells by 2 pixels more than the default. The border-spacing property determines the amount of space between the borders of adjacent cells. The padding property determines the space between content and the cell border.
Consider the following HTML code on a page that resides on a Web server:
.<a> CCYP Home </a>
According to this code, where does the file named index.html reside on the Web server?
Answer:
In the “pages” subdirectory, which resides beneath the page being currently edited
In this example, the file named index.html resides in the “pages” directory, which resides beneath the page currently being edited. Notice that there is no initial forward slash ( / ) in the file path. As a result, the link instructs the page to look for index.html in a subdirectory immediately below the current location. If a forward slash had been included before “pages” in the path, then the file would reside in a directory named “pages” that is off of the root directory.
Consider the following portion of HTML code for creating a table:
Price
Quantity
13.95
72
Also consider the corresponding CSS document code:
table, td, th { border:1px solid gray; } td, th { padding:6px; border-spacing:2px; }
Which statement correctly describes the resulting table?
Answer:
Each cell will have 6 pixels more than the default of space between the content and the cell border.
Each cell in the table will have 6 pixels more than the default of space between the content and the cell border. The padding property determines the space between content and the cell border. The border-spacing property determines the amount of space between the borders of adjacent cells.
You want to specify vertical alignment for the content in a table row using a CSS property. Specifically, you want to move content down to the lowest point in the cell. Which property and value pair would you use?
Answer:
.vertical-align=”bottom”
To vertically align content down to the lowest point in any table element, you would use the vertical-align CSS property with the “bottom” value. This property aligns content vertically. Additional values for the vertical-align property include “top” and “middle”. The text-align property aligns text horizontally.