HTML Flashcards
Where do you put non-visible content (metadata) about the HTML document?
in the head element
Where do you put visible content (to the user) 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?
instructs the web browser on which version of HTML to use when reading the code
Five examples of HTML element types
a, b, strong, em, html, form, img
What is the purpose of HTML attributes?
they provide additional information to an element’s content (e.g color)
What is an example of an HTML entity?
an ampersand, caret, money symbols, copyright, trademark, symbols that are typically used in HTML code (less than/equal than), symbols not on the keyboard
How do block-level elements affect the document flow?
Take up the entire width of the parent container; It creates a new line. other elements are pushed below or above it.
How do inline elements affect the document flow?
They are able to exist on the same line as other inline elements; no new line is created
What are the default width and height of a block-level element?
The default width is the entire width of its parent element/container, the height is the height of the content (auto)
What are the default width and height of an inline element?
The default width and heigh of an inline element is the width and height of its content (auto for both)
What is the difference between an ordered list and unordered list in HTML?
An ordered list has an emphasis on the order of the listed items; it uses numbers to sequentially list the items.
An unordered list uses bullet points for the listed items; order of the items does not matter
Is an HTML list a block element or an inline element?
unordered list, ordered list, and list items are all block elements
What HTML tag is used to link to another website?
anchor / a tag
What is an absolute URL
takes you to an external page or domain ( another website URL), not in current webpage
What is a relative URL?
takes you to another page found within the current domain (internal) - e.g. home page of a URL to the contact-us page
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory
use a backslash
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
point to the file directly (e.g. index.html)
What is the purpose of an HTML form element?
To contain all the form controls in a singular block of code
Give five examples of form control elements
input, option, textarea, select, label
Three examples of type attribute for HTML input options
email, text, button, checkbox, radio
Is an HTML input element a block element or an inline element?
block element (inline block element)
what are the six primary elements used to create a table?
table, thead, th, tbody, tr, td
What purpose do thead and tbody serve?
Helps partition out the code blocks, makes it easier to read
two examples of data that would be displayed well in a table
data for research/studies, stock prices