HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element
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?
Between the opening and closing tags of the HTML element
What is the purpose of a !DOCTYPE declaration?
It tells the browser which version to expect when interpreting the code
Give five examples of HTML element tags.
head, body, title, meta, p, h1, span, div, img, a, etc.
What is the purpose of HTML attributes?
To provide addition information about an HTML element
Give an example of an HTML entity (escape character).
& c o p y ;
How do block-level elements affect the document flow?
They start a new line in the parent element
How do inline elements affect the document flow?
They appear immediately where they are coded in, without starting a new line unless more space is needed
What are the default width and height of a block-level element?
The width is the the entire width (100%) of the parent element, and the height is however much is needed (auto)
What are the default width and height of an inline element?
The width and height is the minimum necessary to display the element (auto)
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered while unordered lists use bullets
Is an HTML list a block element or an inline element?
a block element
What HTML tag is used to link to another website?
a (anchor)
What is an absolute URL?
A URL that contains the entire address of a page, often linking to an external location
What is a relative URL?
A URL linking to a page based on its location relative to the current page
How do you indicate the relative link to a parent directory?
Use ../ to move to the parent directory
How do you indicate the relative link to a child directory?
Start with the name of the child directory
How do you indicate the relative link to a grand parent directory?
Use ../../ to move up 2 levels of parent directories
How do you indicate the relative link to the same directory?
Use either ./ or nothing
What is the purpose of an HTML form element?
To enclose elements that collect data from the user
Give five examples of form control elements.
input, textarea, select, option, fieldset
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 elements for creating tables?
table, thead, tbody, tr, td, th
What purpose do the thead and tbody elements serve?
They group elements by function and allow for easy CSS application
Give two examples of data that would lend itself well to being displayed in a table.
city/state/country population, student grades, user age, sector budgets