HTML & CSS 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 starting with head and followed by body
What is the purpose of a <!DOCTYPE> declaration?
To let the browser know how to interpret the code and what version of HTML we are using
Give five examples of HTML element types.
Html, head, title, body, p, div, span, ul, ol, li
What is the purpose of HTML attributes?
Provides additional details to the element such as the style for the given element, assisting with screen reading, sources, etc
Give an example of an HTML entity (escape character).
<, >, &, “, ‘, /, x
How do block-level elements affect the document flow?
They designate an entire line for the element. By default, the width will match the width of the parent element and the height takes up the size of the content. Both width and height can be customized, if desired.
How do inline elements affect the document flow?
They minimize white space and only use the amount of space that is required
What are the default width and height of a block-level element?
The entire width of its parent element and height of its contents
What are the default width and height of an inline element?
The width and height of its contents
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists will number each listed item. Unordered lists will have each listed item on a bullet point.
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
anchor tag
What is an absolute URL?
The full pathway to a site on the internet
What is a relative URL?
The pathway to a site within the folder/directory the user is currently in, or in other words, the same domain.
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory?
folder/file name
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
File name only
What is the purpose of an HTML form element?
To collect information from users or to help them search
Give five examples of form control elements.
select, text, textarea, checkbox, submit, input, button
Give three examples of type attribute values for HTML <input></input> elements.
radio, text, textarea, checkbox, password, email, submit
Is an HTML <input></input> element a block element or an inline element?
Inline element
What are the six primary HTML elements for creating tables?
table, thead, th, tr, tbody, td
What purpose do the thead and tbody elements serve?
Semantic elements used to separate different sections of the table