Week 1 Quiz Questions Flashcards
Where do you put non-visible content about the HTML document?
It is put in <head></head> (metadata is stored here)
Where do you put visible content about the HTML document?
It is put in <body></body> (text content/ images is put here)
Where do the <head> and <body> tags go in a valid HTML document?
They go between the <html></html> tags (html element)
What is the purpose of a <!DOCTYPE> declaration?
Tells the browser which version of HTML to use
Give five examples of HTML element types.
html element,
head element,
body element,
h1 element,
p element
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts: a name and a value, separated by an equals sign.
Give an example of an HTML entity (escape character).
Copyright symbol–
& c o p y ;
& # 1 6 9 ;
How do block-level elements affect the document flow?
Block elements start content on a new line.
How do inline elements affect the document flow?
Inline elements continue on the same line as the neighboring elements and don’t change/break the flow of content.
What are the default width and height of a block-level element?
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.
What are the default width and height of an inline element?
Inline elements only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists (<ol>) are numbered.
Unordered lists (<ul>) are usually bullet points.
Is an HTML list a block element or an inline element?
Block element.
Basic HTML Skeleton Layout:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body></body>
</html>
What HTML tag is used to link to another website?
<a> tag with the — href =”” — attribute with the URL in the quotations.</a>
What is an absolute URL?
An absolute URL starts with
the domain name for a website, and can be followed by the path to a specific page.
What is a relative URL?
Like a shorthand for absolute URLs but you don’t need to specify the domain name– used when linking to other pages on the same site.
What is a relative URL?
Like a shorthand for absolute URLs but you don’t need to specify the domain name– used when linking to other pages on the same site.
How do you indicate the relative link to a parent directory?
Use–
<a>text content</a>
How do you indicate the relative link to a child directory?
Use–
<a>text content</a>
How do you indicate the relative link to a grand parent directory?
Use–
<a>text content</a>
How do you indicate the relative link to the same directory?
Use–
<a>text content</a>
OR
<a>text content</a>