HTML Essential Training 3 of 3 Flashcards
What is the attribute of the < a > element (anchor tag) that identifies where the user is directed when the link is clicked?
The target attribute
What is the attribute of the < a > element (anchor tag) that identifies where the user is directed when the link is clicked?
The target attribute
What is the purpose of the title attribute?
Consider it an accessibility attribute, can be read by assisted devices, screen readers and search engines. Title attribute describes the link.
[Critical Thinking] Create the exact syntax with a document relative link to a page on a site with an appropriate title attribute.
< a href=”same.htm” title=”link to a page in the same directory” >same.htm< /a >
[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 href=”https://www.target.com/” target=”_blank” title=”link to Target.com”>Visit Target.com
[Critical Thinking] What does the HTML download attribute do for us?
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
6) When creating a link to a page region, what attribute is used to target the fragment of the page?
id attribute is used to target the fragment of the page.
7) Which tag is used to designate an unordered list?
< ul > < /ul >
8) [Critical Thinking] What’s the difference between an ordered list and an unordered list?
Ordered list have a distinct sequence to the list (1,2,3 or a,b,c) while unordered lists are bullet points or disks.
[Critical Thinking] What is the relationship between a <dt> and a </dt><dd>?
</dd>
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>
10) [Critical Thinking] Which selector does the author use to target fonts on the entire page?
He uses the body selector. In CSS, it looks like this: body {
11) Create the exact syntax for an HMTL comment.
12) Which attribute do we use to apply inline styles?
Style attribute. Use colons to separate property: value and use semicolons to end a declaration.
13) [Critical Thinking] Although the author shows inline styles, why does the author advocate not to use them?
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.
14) Write an example of an element selector.
p { or h1 {
Write an example of a CSS selector that applies only to <p> tags with a class named notice? </p>
p.notice {
}