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 and tags go in a valid HTML document?
Siblings, children of HTML element
What is the purpose of a declaration?
To declare the type of the document.
Give five examples of HTML element types.
HTML, head, title, body, h1
What is the purpose of HTML attributes?
Provide additional information about the contents of an element
Give an example of an HTML entity (escape character).
© for copyrighted symbol
How do block-level elements affect the document flow?
They take up the width of the parent element. Push content on the left up and content on the right down.
How do inline elements affect the document flow?
Take up whatever space is needed for the content and doesn’t move any element around.
What are the default width and height of a block-level element?
The width and height of the parent
What are the default width and height of an inline element?
Width and height of whatever space is needed for the content.
What is the difference between an ordered list and an unordered list in HTML?
An ordered list has numbers labeled in ordered pairs while an unordered list has bullet points.
Is an HTML list a block element or an inline element?
block
What HTML tag is used to link to another website?
Anchor
What is an absolute URL?
A direct address
What is a relative URL?
Shorthand name for the file within directory.
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory?
/
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
file name
What is the purpose of an HTML form element?
To collect info from the user
Give five examples of form control elements
Select, textarea, form, button, radio
Three examples of type attribute values for HTML input elements
Text, radio, checkbox
Is HTML element a block element or an inline element?
Inline block element
What are the six primary HTML elements for creating tables?
table, thead, tr, td, tbody, th, tfoot
What purpose do the thead and tbody elements serve?
thead is for headings while body is for every other content
What are the names of the individual pieces of a CSS rule?
rulesets
In CSS, how do you select elements by their class attribute?
by placing a period at the start
In CSS, how do you select elements by their tag name?
with their tag name
In CSS, how do you select an element by its id attribute?
with the pound sign followed by attribute value
What CSS properties make up the box model?
border, margin, padding, and content
Which CSS property pushes boxes away from each other?
margin
Which CSS property add space between a box’s content and its border?
padding
What is a pseudo class?
Keyword to change an element when it is in a certain state
What are the CSS pseudo-classes useful for
help the user with visual feedback
Name two types of units that can be used to adjust font-size in CSS.
px and em
What CSS property controls the font used for the text inside an element?
font-family
what is the default flex-direction of a flex container?
row
what is the default flex-wrap of a flex container?
nowrap
Why do two div elements “vertically stack” on one another by default?
because they are display:block
What is the default value for the position property of HTML elements?
static
How does setting position: relative on an element affect document flow?
the. document flow. like the element was never changed.
How does setting position: relative on an element affect where it appears on the page?
How does setting position: absolute on an element affect document flow?
removes element from document flow
How does setting position: absolute on an element affect where it appears on the page?
it is out of the document flow
How do you constrain an absolutely positioned element to a containing block?
put it in a nonstatic ancestor
What are the four box offset properties?
distances from top bottom left and right
What is the default value for the position property of HTML elements?
static
How does setting position: relative on an element affect document flow?
the document flow stays the same