HTML Attribute Flashcards

(24 cards)

1
Q

What are attributes and how do they work

A

An attribute is a value placed inside the opening tag of an HTML element
Attributes provide additional information about the element or specify how the element should behave

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

Common HTML attributes

A

Href attribute

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

Another Common HTML attribute

A

Is the src or the source and the alt attribute which is used here to specify the source of an image and provide alternative descriptive text for the image respectively

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

Type attribute

A

The type attribute is use to specifies the type of input

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

Input attribute

A

The input attribute are used to collect data form users

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

Check attribute

A

The check attribute is used to specify that the check box should be checked by default

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

Boolean attribute

A

boolean attribute is an attribute that can either be present or absent in an HTML tag

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

Common Boolean attribute

A

Is disabled , read-only , and required these attributes are used to specify the state of an element

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

What is a Charset attribute

A

a charset attribute is attribute inside the meta element ,example <meta charset=utf-8/>

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

What is the id attribute and what’s it use for

A

The id attribute adds unique identifier to and HTML element . example <h1 id=”title> movie review page</h1>

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

What should the ID attribute contain

A

The only contain letters, digits , underscores ,dashes

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

What is the class attribute and it use

A

The class attribute adds an identifier to an HTML element or multiple HTML elements . example <id class=”box”</div>

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

When are classes best used

A

Classes are best used when you want to apply a set of styles to many elements

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

What is the name attribute

A

The name attribute is were you put your description to show that the browsers search engine and other web tools can correctly interrupt the metadata

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

What is the content attribute

A

The content attribute is where you will place your description

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

What is the Property attribute

A

The property attribute is used to specify that this a OG colon title

17
Q

What is the Loop attribute

A

The loop attribute is a boolean attribute that makes audio repla continuously. example <aduio src=https://cdn.freecodecamp.org / curriculum / js -music-player /can’t stay-down.mp3
loop
controls

18
Q

What is the mute attribute

A

The mute attribute mutes the aduio before hand the mute attribute is also a Boolean attribute

19
Q

What is the target attribute

A

The target attribute tells the browser where to open the url for the anchor element. examples < a href=https://”freecodecamp.org” target=”_self”

20
Q

What are examples of the target attribute

A

_self , _ blank , _parent , _top

21
Q

What is _self value

A

his is the default value for the target attribute. This opens the link in the current browsing context. In most cases, this will be the current tab or window.

22
Q

What is _blank value

A

This opens the link in a new browsing context. Typically, this will open in a new tab. But some users might configure their browsers to open a new window instead.

23
Q

what is _parent value

A

This opens the link in the parent of the current context. For example, if your website has an iframe, a _parent value in that iframe would open in your website’s tab/window, not in the embedded frame.

24
Q

What is _top value

A

This opens the link in the top-most browsing context - think “the parent of the parent”. This is similar to _parent, but the link will always open in the full browser tab/window, even for nested embedded frames.