HTML Essential Training 3 of 3 Flashcards

1
Q

What is the attribute of the < a > element (anchor tag) that identifies where the user is directed when the link is clicked?

A

The target attribute

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

What is the attribute of the < a > element (anchor tag) that identifies where the user is directed when the link is clicked?

A

The target attribute

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

What is the purpose of the title attribute?

A

Consider it an accessibility attribute, can be read by assisted devices, screen readers and search engines. Title attribute describes the link.

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

[Critical Thinking] Create the exact syntax with a document relative link to a page on a site with an appropriate title attribute.

A

< a href=”same.htm” title=”link to a page in the same directory” >same.htm< /a >

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

[Critical Thinking] Create the exact syntax with a link with an absolute url to a page on another site, that pops up into a new tab or a new window.

A

< a href=”https://www.target.com/” target=”_blank” title=”link to Target.com”>Visit Target.com

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

[Critical Thinking] What does the HTML download attribute do for us?

A

Download attribute forces a file, like PDF, to download rather than open in the web browser. You can also overwrite the name of the file being downloaded. Ex) Original file: tables.pdf → use download attribute: download=”desired_name” → file downloaded: desired_name.pdf

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

6) When creating a link to a page region, what attribute is used to target the fragment of the page?

A

id attribute is used to target the fragment of the page.

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

7) Which tag is used to designate an unordered list?

A

< ul > < /ul >

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

8) [Critical Thinking] What’s the difference between an ordered list and an unordered list?

A

Ordered list have a distinct sequence to the list (1,2,3 or a,b,c) while unordered lists are bullet points or disks.

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

[Critical Thinking] What is the relationship between a <dt> and a </dt><dd>?
</dd>

A

Both a <dt> and a </dt><dd> are siblings and are semantic tags. </dd><dt> means description term, while </dt><dd> means description definition. They are children of the parent <dl> tag (description list).

</dl></dd>

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

10) [Critical Thinking] Which selector does the author use to target fonts on the entire page?

A

He uses the body selector. In CSS, it looks like this: body {

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

11) Create the exact syntax for an HMTL comment.

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

12) Which attribute do we use to apply inline styles?

A

Style attribute. Use colons to separate property: value and use semicolons to end a declaration.

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

13) [Critical Thinking] Although the author shows inline styles, why does the author advocate not to use them?

A

The issue with inline styling is that the styling will only apply to the page it was written on. If you have a site with multiple pages, you would have to write the inline styling for each page. It is more efficient to have a global styling sheet so changes will be applied to all pages, saving time and effort.

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

14) Write an example of an element selector.

A

p { or h1 {

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
Write an example of a CSS selector that applies only to <p> tags with a class named notice?
</p>
A

p.notice {

}

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

16) [Critical Thinking] Why would you declare more than one font in a font-family CSS rule?

A

Font-family declarations tell the client what type of font to render. If the client does not support the 1st font declared, the 2nd font will be rendered and so on. Additional font declaration is a fall back font for the client’s browser to render if the first font is not supported by the client’s device/ browser.

18
Q

17) [Critical Thinking] Why does the author prefer ems instead of pixels for the font-size?

A

Pixel font-sizes are absolute, font sizes will render to the size of pixel length desired. Regardless if your looking at the site on a phone or desktop, pixel size will be the same. Font size will look bigger on the phone compared to the desktop screen. ems tells the client to render the default font size. Font size will be different between each device. 2 em tells the client to render the default font size 2x bigger.

19
Q

18) [Critical Thinking] What happens when the author uses the margin property and only sets three values?

A

When only three values are used in the margin property, the first value will be the top margin value, the second value will be the right and left margin value, and the third value will be the bottom margin value. Margin shorthand values are set clockwise: margin: 0(top) 1em(right) .6em(bottom) 1em(left);

20
Q

19) [Critical Thinking] Why does the author warn about using reserved words for colors?

A

Reserved words for colors may not be consistent with all browsers. Some browsers may render the reserved word color slightly different.

21
Q

20) [Critical Thinking] What is the purpose of the rel attribute?

A

The purpose of the rel attribute is to tell the user’s browser the relationship between the current page and the link to the resource provided.

22
Q

What is the purpose of the title attribute?

A

Consider it an accessibility attribute, can be read by assisted devices, screen readers and search engines. Title attribute describes the link.

23
Q

[Critical Thinking] Create the exact syntax with a document relative link to a page on a site with an appropriate title attribute.

A

< a href=”same.htm” title=”link to a page in the same directory” >same.htm< /a >

24
Q

[Critical Thinking] Create the exact syntax with a link with an absolute url to a page on another site, that pops up into a new tab or a new window.

A

< a href=”https://www.target.com/” target=”_blank” title=”link to Target.com”>Visit Target.com

25
Q

[Critical Thinking] What does the HTML download attribute do for us?

A

Download attribute forces a file, like PDF, to download rather than open in the web browser. You can also overwrite the name of the file being downloaded. Ex) Original file: tables.pdf → use download attribute: download=”desired_name” → file downloaded: desired_name.pdf

26
Q

6) When creating a link to a page region, what attribute is used to target the fragment of the page?

A

id attribute is used to target the fragment of the page.

27
Q

7) Which tag is used to designate an unordered list?

A

< ul > < /ul >

28
Q

8) [Critical Thinking] What’s the difference between an ordered list and an unordered list?

A

Ordered list have a distinct sequence to the list (1,2,3 or a,b,c) while unordered lists are bullet points or disks.

29
Q

[Critical Thinking] What is the relationship between a <dt> and a </dt><dd>?
</dd>

A

Both a <dt> and a </dt><dd> are siblings and are semantic tags. </dd><dt> means description term, while </dt><dd> means description definition. They are children of the parent <dl> tag (description list).

</dl></dd>

30
Q

10) [Critical Thinking] Which selector does the author use to target fonts on the entire page?

A

He uses the body selector. In CSS, it looks like this: body {

31
Q

11) Create the exact syntax for an HMTL comment.

A

< !– You can write your comment or code here and code will be ignored– >

32
Q

12) Which attribute do we use to apply inline styles?

A

Style attribute. Use colons to separate property: value and use semicolons to end a declaration.

33
Q

13) [Critical Thinking] Although the author shows inline styles, why does the author advocate not to use them?

A

The issue with inline styling is that the styling will only apply to the page it was written on. If you have a site with multiple pages, you would have to write the inline styling for each page. It is more efficient to have a global styling sheet so changes will be applied to all pages, saving time and effort.

34
Q

14) Write an example of an element selector.

A

p { or h1 {

35
Q
Write an example of a CSS selector that applies only to <p> tags with a class named notice?
</p>
A

p.notice {

}

36
Q

16) [Critical Thinking] Why would you declare more than one font in a font-family CSS rule?

A

Font-family declarations tell the client what type of font to render. If the client does not support the 1st font declared, the 2nd font will be rendered and so on. Additional font declaration is a fall back font for the client’s browser to render if the first font is not supported by the client’s device/ browser.

37
Q

17) [Critical Thinking] Why does the author prefer ems instead of pixels for the font-size?

A

Pixel font-sizes are absolute, font sizes will render to the size of pixel length desired. Regardless if your looking at the site on a phone or desktop, pixel size will be the same. Font size will look bigger on the phone compared to the desktop screen. ems tells the client to render the default font size. Font size will be different between each device. 2 em tells the client to render the default font size 2x bigger.

38
Q

18) [Critical Thinking] What happens when the author uses the margin property and only sets three values?

A

When only three values are used in the margin property, the first value will be the top margin value, the second value will be the right and left margin value, and the third value will be the bottom margin value. Margin shorthand values are set clockwise: margin: 0(top) 1em(right) .6em(bottom) 1em(left);

39
Q

19) [Critical Thinking] Why does the author warn about using reserved words for colors?

A

Reserved words for colors may not be consistent with all browsers. Some browsers may render the reserved word color slightly different.

40
Q

20) [Critical Thinking] What is the purpose of the rel attribute?

A

The purpose of the rel attribute is to tell the user’s browser the relationship between the current page and the link to the resource provided.