HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element. This is also where metadata is stored.
Where do you put visible content about the HTML document?
In the body element.
Where do the head and body tags go in a valid HTML document?
They go in the html element. Head comes before body.
What is the purpose of a !DOCTYPE declaration?
To tell the browser which version of html to use
Give five examples of HTML element tags.
html, head, title, body, div, h1, p, etc.
What is the purpose of HTML attributes?
To provide additional information about the contents of an element. Located in the opening tag of the element.
Give an example of an HTML entity (escape character).
Left angled bracket, ampersand, quotation marks, copyright, registered trademark
How do block-level elements affect the document flow?
They always appear on a new line and takes up the full width available.
How do inline elements affect the document flow?
They only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
What are the default width and height of a block-level element?
Width = auto (entire horizontal space of its parent element and vertical space equal to the height of its contents), height = 100%
What are the default width and height of an inline element?
Height = auto, width = auto.
What is the difference between an ordered list and an unordered list in HTML?
Ordered list is where each item is numbered. Unordered is with bullet points.
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
achor tag, with an href attribute and value of an absolute URL
What is an absolute URL?
A link that takes you to another website/domain
What is a relative URL?
A link that takes you to a specific part of the same page or another page on the same website/domain
How do you indicate the relative link to a parent directory?
../index.html
How do you indicate the relative link to a child directory?
folder/index.html
How do you indicate the relative link to a grand parent directory?
../../index.html
How do you indicate the relative link to the same directory?
index.html (just the name of the file)
What is the purpose of an HTML form element?
to collect info from visitors to your site / boundary for form control elements
Give five examples of form control elements.
input, textarea, select, option, submit
Give 3 examples of type attributes for HTML input elements
text, password, file, submit, image
Is an HTML input element a block element or an inline element?
inline