HTML Flashcards
Where do you put non-visible content about the HTML document?
Within the head element
Where do you put visible content about the HTML document?
Within the body element
Where do the head and body tags go in a valid HTML document?
Within the html element
What is the purpose of a !DOCTYPE declaration?
To tell the browser which version of HTML the document is using
Five examples of HTML element tags
There’s a fuck-ton. List 5
What is the purpose of HTML attributes?
Provide additional information for the element
Give an example of an HTML entity (escape character)
e.g. copyright, trademark, yen, euros, etc
How do block-level elements affect the document flow?
They start a new line and will take up the entire width of its container
How do inline elements affect the document flow?
They stay within its line and only take up as much space as they need. Trying to adjust its height/width does nothing
What are the default width and height of a block-level element?
block elements take up the entire width of its container while the height is auto (takes only as much as it needs)
What are the default width and height of an inline element?
inline elements only take up as much height/width as it needs (aka auto)
What is the difference between an ordered list and an unordered list?
ordered lists are numbered (or alphabetized, roman numbers, etc)
unordered lists are bullet points
Is an HTML list a block element or an inline element
lists are block elements as well as their list items
What HTML tag is used to link to another website?
the anchor tag (a) using the attribute href=url
What is an absolute URL?
a URL that points outside of our own site/computer. Usually starts with an https:// or http://
What is a relative URL?
URL that points to a file within our own site/system
How do you indicate relative link to a parent directory?
../file-name.html
How do you indicate the relative link to a child directory?
child-directory/file-name.html
How do you indicate the relative link to a grandparent directory?
../../file-name.html
How do you indicate the relative link to same directory?
file-name.html
What is the purpose of an HTML form element?
To collect user input as well as containing all form elements
Give five examples of form control elements
input select label textarea fieldset legend
Give three examples of type attributes for HTML input elements
text, password, radio, checkbox, submit
Is an HTML input element a block element or an inline element?
inline
What are the six primary HTML table elements?
table thead tbody th tr td
What purpose do thead and tbody elements serve?
thead: defines the heads of the columns in the table
tbody: contains rows of the table which comprises of the body of the table
Give two examples of data that would lend itself well to being displayed in a table.
grades, stocks, finances, statistics
tabular data