HTML & CSS 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
</html>
What is the purpose of a <!DOCTYPE> declaration?
To specific version of HTML used
Give five examples of HTML element types.
html, head, body, title, h1
What is the purpose of HTML attributes?
to give more detail/description for elements
Give an example of an HTML entity (escape character).
© for copyright symbol
How do block-level elements affect the document flow?
start on new line and next element start on new line
How do inline elements affect the document flow?
can appear on the same line next to another inline elements
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?
width = auto (content)
height = auto
What is the difference between an ordered list and an unordered list in HTML?
by default one is number and one is bulleted
Is an HTML list a block element or an inline element?
block element
What HTML tag is used to link to another website?
anchor element <a></a>
What is an absolute URL?
link to external sources
What is a relative URL?
link to internal sources (jump between internal files or divider)
How do you indicate the relative link to a parent directory?
../ (forward slash)
How do you indicate the relative link to a child directory?
directory/file
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
./ or pointing to file
What is the purpose of an HTML form element?
to group form elements together (boundary)
Give five examples of form control elements.
<form>, <input></input>, <select>/<option>, <textarea>, <button>
</button></textarea></option></select></form>
Give three examples of type attribute values for HTML <input></input> elements.
text, radio, checkbox, submit, password
Is an HTML <input></input> element a block element or an inline element?
inline element
What are the six primary HTML elements for creating tables?
<table>, <tr>, <thead>, <tbody>, <tfoot>, <th>, <td>
</td></th></tfoot></tbody></thead></tr></table>
What purpose do the thead and tbody elements serve?
define set of rows into either head or body
Give two examples of data that would lend itself well to being displayed in a table.
sport statistic & stocks info
What are the names of the individual pieces of a CSS rule?
selector, declaration block, declaration, property, value, rule-set
In CSS, how do you select elements by their class attribute?
using . (dot/period)