HTML / CSS Flashcards
Where do you put non-visible content about the HTML document?
Between the head tags
Where do you put visible content about the HTML document?
Between the body tags
Where do the head and body tags go in a valid HTML document?
The head goes at the top of the HTML document. The body tag goes at the bottom of the HTML document, below the head tags
What is the purpose of a Doctype declaration?
Declaration to tell a browser which version of HTML the page is using
Give five examples of HTML element tags.
<div> <a> <img></img> <span> </span></a></div>
What is the purpose of HTML attributes?
HTML attributes give additional information regarding the tag
Give an example of an HTML entity (escape character).
© copyright
How do block-level elements affect the document flow?
Block-level elements take start on a new row and take 100% width of its parent container
How do inline elements affect the document flow?
Inline elements are only as wide as their content
What are the default width and height of a block-level element?
A block-level element’s width is 100% of its parents container
What are the default width and height of an inline element?
As wide as its content
What is the difference between an ordered list and an unordered list in HTML?
Ordered list is ordered numerically. Unordered list items are listed as bullet points
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
<a> anchor tag. The URL is listed with an href attribute</a>
What is an absolute URL?
An absolute URL contains all information necessary to locate a resource
What is a relative URL?
A relative URL points to a file relative to the current page
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory?
Name of directory followed by /file-name
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
Name of file in current directory or ./ file name
What is the purpose of an HTML form element?
Allow you to collect information from visitors to your site
Give five examples of form control elements.
text input, radio buttons, submit buttons, checkboxes, and text area
Give three examples of type attributes for HTML elements.
type, name, size, maxlength, value, id, selected
Is an HTML element a block element or an inline element?
Inline
What are the six primary HTML elements for creating tables?
table, thead, tbody, tfoot, th, td.