Basic HTML And CSS Flashcards

1
Q

What is the top-most required first line of the HTML file?

A

Less-than !DOCTYPE html greater-than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the characteristic of a block-level element?

A

There is always a line before and after the block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

List block-level elements (4 types).

A

P, h1-h6, form, div

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe inline tags

A

They don’t cause a line break.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In the latest browsers, what is the effect of the title attribute?

A

It provides text that will show up in a hover.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some tags that are singleton and do not need a closing element:

A

br img and hr

NOTE: the trailing slash like br is required in xhtml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the alt tag used for in the <img></img>

A

If the source (src) image is not found (fails to load), then the alt text will be displayed in its place.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Show example of a table header section

A

lt tr>
lt th>column 1 lt/th>
lt th>column 2 lt/th>
lt/tr>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where does the section of a table FOOTER definition go?

A

Immediately after the heading section.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between background and background-color in the element styling?

A

None

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the html for a dropdown list

A

lt select >

lt option value=”Mustang”> Mustang lt\option>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

List the attributes common for a drop down list (select)

A

name
multiple - can select multiple
size - max # of visible options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you associate a label with a form element:

A

lt Label for =”FullName”> Full Name lt /Label>

lt input name=”FullName” />

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe the field set element

A

Groups the elements;
Can contain separate forms;
Can add disable attribute to disable the fieldset group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

After applying a background-image to a screen, what problem occurs in its use and how can you correct it.

A

By default, it repeats horizontally and vertically. To make it repeat in only one direction:
background-repeat: repeat-x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In CSS styling, how would you specify styles that apply to everything.

A

*{
margin: 0 auto 0 auto;
text-align: left;
}

17
Q

What does margin: auto do?

For example: margin: 0 auto 0 auto

A

Auto causes the margin to be automatically computed: the contents will be centered within the container with equal space on the left and the right.
So (the example) 0 top margin, auto right, 0 bottom, auto left.

18
Q

When elements have been given float left/right and we want to add the next element below these, what CSS will prevent the previous floats from affecting out ‘next’ element.

A

In the css block: clear : both

19
Q

How do we remove bullets from a ul list.

A

With a css of list-style : none

20
Q

How can we make ul list elements (li) show horizontally?

A
By default, the li elements are block elements.
#menu ul li a {     // the anchor (links) 
       display:inline
21
Q

How can we remove the underlines from anchor links?

A

Css: text-decoration : none;

22
Q

How do we specify a styling of bold?

A

font-weight : bold

23
Q

Use css3 to provide rounded corners

A

border-radius: 10px;

24
Q

How can we prevent previously selected links from displaying in a different color?

A

Style it like: #leftmenu a:visited {

25
Q

How can we change the color of anchor tags that are hovered?

A

Styling: a:hovered {