HTML Flashcards
What CSS property controls the font used for the text inside an element?
font-size CSS property
Name two types of units that can be used to adjust font-size in CSS.
px and em
What is the default flex-wrap of a flex container?
nowrap, all items will try to fit on one line
What are CSS pseudo-classes useful for?
Use CSS Pseudo-classes to Highlight User’s Position
What is a pseudo-class?
A pseudo-class is a selector that selects elements that are in a specific state, e.g. they are the first element of their type, or they are being hovered over by the mouse pointer.
What CSS property controls the font used for the text inside an element?
font-size CSS property
Name two types of units that can be used to adjust font-size in CSS.
em, px
What is the default flex-direction of a flex container?
horizontal
Where do you put non-visible content about the HTML document?
Before or after the body element.
Where do you put visible content about the HTML document?
The HTML document itself begins with html and ends with html element The visible part of the HTML document is between body and body .
What is the default flex-direction of an element with display: flex?
Items display in a row (the flex-direction property’s default is row ). The items start from the start edge of the main axis. The items do not stretch on the main dimension, but can shrink.
Why do two div elements “vertically stack” on one another by default?
Because they are block elements
Where do the head and body tags go in a valid HTML document?
The element is a container for metadata (data about data) and is placed between the tag and the tag.
What is the purpose of a declaration?
The DOCTYPE declaration is an instruction to the web browser about what version of HTML the page is written in.
Give five examples of HTML element types.
<h1> </h1>
<p> </p>
What is the purpose of HTML attributes?
HTML attributes can be used to change the color, size, and other features of HTML elements.
Give an example of an HTML entity (escape character).
&r.eg;
the dot after the r is not supposed to be there
How do block-level elements affect the document flow?
By default block elements will consume all of the space in the inline direction,
How do inline elements affect the document flow?
By default, inline elements do not force a new line to begin in the document flow. Block elements, on the other hand, typically cause a line break to occur (although, as usual, this can be changed using CSS).
What are the default width and height of a block-level element?
All block level elements inherit the width of their parent element by default.
What are the default width and height of an inline element?
The height and width of an inline element is exactly the height and width of the content.
What is the different between an ordered list and an unordered list in HTML?
Unordered list — Used to create a list of related items, in no particular order. Ordered list — Used to create a list of related items, in a specific order.
Is an HTML list a block element or an inline element?
Block element.
What HTML tag is used to link to another website?
<a></a>