LFZ Flashcards
Where do you put non-visible content about the HTML document?
head element
Where do you put visible content about the HTML document?
body element
Where do the head and body tags go in a valid HTML document?
html element
What is the purpose of a !DOCTYPE declaration?
clarify version of html for compatibility
Give five examples of HTML element types.
h1, p, a, img, form, span, div
What is the purpose of HTML attributes?
modify or add functionality to elements
Give an example of an HTML entity (escape character).
& copy reg pound yen lt gt ;
How do block-level elements affect the document flow?
newline, take up full horizontal space
How do inline elements affect the document flow?
they do not, and adopt the width and height of their contents
What are the default width and height of a block-level element?
100% width
content-size height
What are the default width and height of an inline element?
content size
What is the difference between an ordered list and an unordered list in HTML?
ordered lists default to numbered,
unordered defaults to bullets
Is an HTML list a block element or an inline element?
block element
What HTML tag is used to link to another website?
a
What is an absolute URL?
a complete path to the location of a resource, often to external servers
What is a relative URL?
a partial url based on the filepath of the hosting server
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory?
./child/
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
./
What is the purpose of an HTML form element?
to receive inputs and information from end users, UI to interact with website
Give five examples of form control elements.
label input button option select textarea
Give three examples of type attribute values for HTML input elements.
button checkbox date email image radio search url time
Is an HTML input element a block element or an inline element?
inline-block by default
What are the six primary HTML elements for creating tables?
thead tbody tfoot th tr tf td
What purpose do the thead and tbody elements serve?
they allow different formatting for header first row
Give two examples of data that would lend itself well to being displayed in a table.
high dimensional numerical data
long text comparison between options
What are the names of the individual pieces of a CSS rule?
selector declarations
In CSS, how do you select elements by their class attribute?
.class {
}
In CSS, how do you select elements by their type?
type {
}
In CSS, how do you select an element by its id attribute?
#id { }
Name three different types of values you can use to specify colors in CSS.
RGB(a)
HSL(a)
#hexcode
What CSS properties make up the box model?
width height margin padding box-sizing
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?
a keyword modifier to a css selector that activates on specific states
What are CSS pseudo-classes useful for?
reactivity to user input
Name two types of units that can be used to adjust font-size in CSS.
px em %
What CSS property controls the font used for the text inside an element?
font-family: fontname, backups;
What is the default flex-direction of a flex container?
flex-direction: row
What is the default flex-wrap of a flex container?
flex-wrap: nowrap;
Why do two div elements “vertically stack” on one another by default?
they are block elements
What is the default flex-direction of an element with display: flex?
flex-direction: row
What are the four components of “the Cascade”.
inheritance
source order
specificity
!important