Attributes Flashcards

1
Q

What is an attribute?

A

An attribute is used to define the characteristics of an HTML element and is placed inside the element’s opening tag. All attributes are made up of two parts − a name and a value

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

What is an id attribute?

A

The id attribute of an HTML tag can be used to uniquely identify any element within an HTML page

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

What is a title attribute?

A

The title attribute gives a suggested title for the element. It is often displayed as a tooltip when cursor comes over the element or while the element is loading.

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

What is a class attribute?

A

The class attribute is used to associate an element with a style sheet, and specifies the class of element.

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

What is a style attribute?

A

The style attribute allows you to specify Cascading Style Sheet (CSS) rules within the element.
example:
style = “font-family:arial; color:#FF0000;”

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

How do you define the direction of the text in an html element?

A

Using the dir attribute and it takes 2 vlues rtl or ltr.
example:
dir=”rtl”

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

What attribute is used to align text in element horizontaly?

A

align and it takes 3 values left, center or right.

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

What attribute is used to align text in element verticaly?

A

valign and it takes 3 values top, middle or bottom.

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

What attribute is used to put a background color for an element?

A

bgcolor and it takes numeric, hexidecimal or RGB values.

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

What attribute is used to put a backgound image for an element?

A

background and it takes a url.

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

What attribute is used to specify the width of tables, images or table cells?

A

width

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

What attribute is used to specify the height of tables, images or table cells?

A

height

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