HTML Flashcards
Where do you put non-visible content about the HTML document
Head element
Where do you put visible content about the HTML document?
Within the body element
What is the purpose of a <!DOCTYPE> declaration?
To show the version of the language
Give five examples of HTML element types.
HTML element, Body element, P element, head element, title element, h1 element
What is the purpose of HTML attributes?
It indicates what kind of extra information you are supplying about the element’s content, it should be written in lowercase
Give an example of an HTML entity (escape character).
< less than
> greater than
& ampersand
How do block-level elements affect the document flow?
They always appear to start on a new line in the browser window
How do inline elements affect the document flow?
They always appear to continue on the same line as their neighboring elements
What are the default width and height of a block-level element?
height: auto
width: 100%
What are the default width and height of an inline element?
weight: auto
height: auto
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists use numbers
Unordered lists use 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 element which has an attribute called href
What is an absolute URL?
Starts with the domain name for that site, and can be followed by the path to a specific page
What is a relative URL?
A shorthand version of the absolute urls because you do not need to specify the domain name.
How do you indicate the relative link to a parent directory?
Use ../ to indicate the folder above the current one, then follow it with the file name.
How do you indicate the relative link to a child directory?
For a child folder, use the name of the child folder, followed by a forward slash, then the file name.
How do you indicate the relative link to a grand parent directory?
Repeat the ../ to indicate that you want to go up two folders(rather than one) then follow it with the file name
How do you indicate the relative link to the same directory?
To link to a file in the same folder, just use the file name. (Nothing else is needed)
What is the purpose of an HTML form element?
it sets up the boundary of the form and it gives you a set of elements to collect data from your users
Give five examples of form control elements.
<input></input> element
<text> element
<select> element
<option> element
<button> element
<legend> element
</legend></button></option></select></text>
Give three examples of type attribute values for HTML <input></input> elements.
<action> attribute
<id> attribute
<size> attribute
type=”text” attribute
maxlength attribute
<value> attribute
<checked> attribute
</checked></value></size></id></action>
Is an HTML <input></input> element a block element or an inline element?
It is an inline because its able to have the same content in the same line
What are the six primary HTML elements for creating tables?
<table>
<tr>
<td>
<th>
<thead>
<tbody>
<tfoot>
</tfoot></tbody></thead></th></td></tr></table>
What purpose do the thead and tbody elements serve?
Thead-The <thead> HTML element defines a set of rows defining the head of the columns of the table.
tbody-
The <tbody> HTML element encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).
Give two examples of data that would lend itself well to being displayed in a table.
Financial reports, tv schedules, sports results
What are the names of the individual pieces of a CSS rule?
A selector and a declaration block, property and value
In CSS, how do you select elements by their class attribute?
By putting a Period symbol before the name of the class
In CSS, how do you select elements by their tag name?
Matches element tag names
In CSS, how do you select an element by its id attribute?
By using the #, pound sign or hash symbol.
Name three different types of values you can use to specify colors in CSS.
RGB Values
Hex codes
Color names
What CSS properties make up the box model?
The box model consists of: margins, borders, padding, and the actual content (width & height).
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?
It is a keyword added to a selector that specifies a special state of the selected element(s)
What are CSS pseudo-classes useful for?
They let you apply a style to an element not only in relation to the content of the document tree, but also in relation to external factors like the history of the navigator.
Ex. User interaction
Name two types of units that can be used to adjust font-size in CSS.
Pixels, rem
What CSS property controls the font used for the text inside an element?
Font family property
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 block elements
What is the default flex-direction of an element with display: flex?
row