HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element
Where do you put visible content about the HTML document?
In the body element
Where do the head and body tags go in a valid HTML document?
Within the HTML element
What is the purpose of a !DOCTYPE declaration?
To declare which version of html the page is using
Give five examples of HTML element tags.
h1 - h6, p, div, img, title, head, body, html
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element.
Give an example of an HTML entity (escape character).
' (apostrophe), & (ampersand), © (copyright), ® (registered trademark), &*acute (acute accent above a letter)
How do block-level elements affect the document flow?
They will always create/begin on a new line and will take up the entire width of the page, nothing will sit next to it.
How do inline elements affect the document flow?
They will continue on the same line as neighboring elements.
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; their height is the height of the content.
What are the default width and height of an inline element?
Only as much as is necessary for the content.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists use numbers before each list item, while unordered lists use bullet points before each list item.
Is an HTML list a block element or an inline element?
Lists are block elements
What HTML tag is used to link to another website?
‘a’ or Anchor element with the href attribute (<a></a>)
What is an absolute URL?
The full web address for the site you’re linking to in the href attribute.
What is a relative URL?
A shorthand version of absolute URLs because you do not need to specify the domain name. Used when you are linking to other pages within the same site.
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?
Use ../ ../ 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?
HTML forms give you a set of elements to collect data from your users.
Give five examples of form control elements.
Text input (single- or multi-line{comments box}), password input, radio button, checkbox, drop-down, submit buttons, image buttons, file upload
Give three examples of “type” attributes for HTML “input” elements.
type=”text”, “password”, “radio”, “checkbox”, “file”, “submit”, ”image”, “hidden”
Is an HTML “input” element a block element or an inline element?
“input” is an inline element
What are the six primary HTML elements for creating tables?
table, thead, tr, th, tbody, td, tfoot
What purpose do the “thead” and “tbody” elements serve?
thead and tbody help distinguish between the main content of the table and the first and last rows (which can contain different content)
Give two examples of data that would lend itself well to being displayed in a table.
Calendars, stats, financial reports, TV schedules, sports results, etc.