HTML/CSS Flashcards
Where do you put non-visible content about the HTML document?
the <head> element
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?
in between the <html> tags
What is the purpose of a <!DOCTYPE> declaration?
To let the browser know what version of html you are running
Give five examples of HTML element types.
head, body, paragraph, header, footer
What is the purpose of HTML attributes?
to further define an element
Give an example of an HTML entity (escape character).
® (reserved trademark)
How do block-level elements affect the document flow?
they take up the full width of their container
How do inline elements affect the document flow?
they only take up as much space as they need within their container
What are the default width and height of a block-level element?
width: 100% height: auto (only takes up as much space as needed height-wise)
What are the default width and height of an inline element?
width: auto height: auto (only takes up as much space as needed on both ends there)
What is the difference between an ordered list and an unordered list in HTML?
ordered list is numbered while unordered isn’t
Is an HTML list a block element or an inline element?
block element, takes up the whole width
What HTML tag is used to link to another website?
anchor, <a></a>
What is an absolute URL?
a URL linking you to an external website, has to have https://
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory?
directory(folder)/file
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
just link file (index.html)
What is the purpose of an HTML form element?
allows you to group together the form control elements, sets up the boundaries of the form
Give five examples of form control elements.
input, select, textarea, label, button
Give three examples of type attribute values for HTML <input></input> elements.
radio, checkbox, text,
Is an HTML <input></input> element a block element or an inline element?
in-line
What are the six primary HTML elements for creating tables?
<table>, thead, <tr> (table row), <th> (table heading), tbody,<td> (table data), tfoot
</td></th></tr></table>
What purpose do the thead and tbody elements serve?
thead holds the headers for the table. and tbody holds the data for the body - for the most part.
Give two examples of data that would lend itself well to being displayed in a table.
sports results, student grades