HTML Flashcards
Where do you put non-visible content about the HTML document?
Head
Where do you put visible content about the HTML document?
body
Where do the head and body tags go in a valid HTML document?
within the html tags
What is the purpose of a DOCTYPE declaration?
declare the version of HTML being used
Give 5 examples of HTML element tags.
p, head, body, html, span
What is the purpose of HTML attributes?
They give us more information about the element
Give an example of an HTML entity (escape character)
®
How do block-level elements affect the document flow?
they start a new line
How do inline elements affect the document flow
they are on the same line
what are the default width and height of a block-level element?
width = 100% (of container) height = auto
What are the default width and height of an inline element?
both auto
What is the difference between an ordered and unordered list in HTML?
ordered are numbered, unordered are not
Is an HTML list a block or inline element?
block
What HTML tag is used to link to another website?
anchor tag (a)
What is an absolute URL?
external navigation, nav to another site
What is a relative URL?
internal navigation, nav within your site
How do you indicate the relative link to a parent directory?
../parent
How do you indicate the relative link to a child directory?
child/wherever
How do you indicate the relative link to a grand parent directory?
../../grand parent
How do you indicate the relative link to the same directory?
just type name of desired file
What is the purpose of an HTML form element?
Collect user input/information
Give five examples of form control elements.
input, text area, select, option, button
Give three examples of type attributes for HTML input elements.
submit, file, radio, checkbox, password, text
Is an HTML input element a block or inline element?
inline
What are the 6 primary HTML elements for creating tables?
table, thead, tbody, tr, td, tfoot
What purpose do the thead and tbody elements serve?
organizational purpose
Give two examples of data that would lend itself well to being displayed in a table.
sport scores, grades, any tabular data
What are the names of the individual pieces of a CSS rule?
selector, declaration block, property, value
In CSS, how do you select elements by their class attribute
.classname
In CSS, how do you select elements by their type?
type name
In CSS, how do you select an element by its id attribute?
idname
Name three different types of values you can use to specify colors in CSS.
hex code, RGB, color name, RGBA, HSL (hue saturation and luminosity), HSLA
What CSS properties make up the box model?
border, padding, margin
Which CSS property pushes boxes away from eachother?
margin
Which CSS property add space between a box’s content and its border?
padding
What is a pseudo-class
classes applied by browser based on certain state
What are CSS pseudo-classes useful for?
style without adding classes to elements/updating HTML
Name at least two units of type size in CSS
px, em, rem
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?
no-wrap
Why do two div elements “vertically stack” on one another by default?
block elements
What is the default flex-direction of an element with display: flex?
row
What is the default value for the position property of HTML elements?
static