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?
In the html element
What is the purpose of a < !DOCTYPE > declaration?
To tell what type of document the file is and which version of html to use
What is the purpose of HTML attributes?
To attach extra information to elements
How do block-level elements affect the document flow?
Block elements starts on a new line, take up the entire width of the page and elements after it starts on a new line
How do inline elements affect the document flow?
Inline only takes up space as needed
What are the default width and height of a block-level element?
Width is 100% and height is auto
What are the default width and height of an inline element?
Width and height are auto
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists is numbered and unordered lists use bullet points
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 URL address
What is a relative URL?
A URL without the domain name, partial directory
How do you indicate the relative link to a parent directory?
../(file name)
How do you indicate the relative link to a child directory?
(child directory name)/(file name)
How do you indicate the relative link to a grand parent directory?
../../(file name)
How do you indicate the relative link to the same directory?
file name
What is the purpose of an HTML form element?
collect data from user
Is an HTML element a block element or an inline element?
inline
What are the six primary HTML elements for creating tables?
< table > , < thead > , < tbody > , < th > , < tr > , < td >
What purpose do the thead and tbody elements serve?
Organizing and formatting information
What are the names of the individual pieces of a CSS rule?
selector, declaration block, property, property value
In CSS, how do you select elements by their class attribute?
.(class name)