HTML Flashcards
Where do you put non-visible content about the HTML document?
The head element. (metadata)
Where do you put visible content about the HTML document?
The body element.
Where do the head and body tags go in a valid HTML document?
The head and body elements are located within the html element as siblings. The starting tags go at the beginning of the element.
What is the purpose of a DOCTYPE declaration?
Declaration lets the browser know what version of HTML it is.
Give five examples of HTML element types.
h1, img, p, span, div
What is the purpose of HTML attributes?
Attach additional data to an element and its content.
Give an example of an HTML entity (escape character).
& followed by copy; for copyright symbol.
How do block-level elements affect the document flow?
Block-level elements start on a new line and take up the whole width of the containing block.
How do inline elements affect the document flow?
Inline elements happen within a line. Not breaking the flow and staying within the boundaries of the tags.
What are the default width and height of a block-level element?
Width: entire horizontal space of container.
Height: height of content within element.
What are the default width and height of an inline element?
Width/Height: only as much as the element needs.
What is the difference between an ordered list and an unordered list in HTML?
○Ordered list is sorted in order, whilst unordered list isn’t (order of list items doesn’t matter).
Is an HTML list a block element or an inline element?
ul, ol, and li are all block elements.
What HTML tag is used to link to another website?
a, with the attribute href=”url” to determine where the link will take the user.
What is an absolute URL?
Domain name + path to page (if not included, takes user to homepage).
What is a relative URL?
File or file path relative to the folder that the HTML is located.
How do you indicate the relative link to a parent directory?
○ ../file.html
How do you indicate the relative link to a child directory?
foldername/file.html
How do you indicate the relative link to a grand parent directory?
../../file.html
How do you indicate the relative link to the same directory?
file.html
What is the purpose of an HTML form element?
Lets the user interact with the website and provide data for the server to use/process.
Give five examples of form control elements.
input, text area, select, option, button
Give three examples of type attribute values for HTML input elements.
text, radio, 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, tr, td, th, thead, tbody, and (tfoot)
What purpose do the thead and tbody elements serve?
Separate the header and the body of the table to allow for specialized styling.
Give two examples of data that would lend itself well to being displayed in a table.
Financial reports and schedules