HTML Flashcards
What is the purpose of an HTML form element?
to collect data from users
Give five examples of form control elements
- *totally wrong??**
- text input
- text area
- password input
- radio buttons
- checkboxes
- drop-down boxes
- submit buttons
- image buttons (subscribe image)
- file upload
Give three examples of TYPE attribute values for HTML input elements
“text”
“password”
“radio”
“checkbox”
Is an HTML input element a block element or inline element?
in-line block
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?
nested within the html element
- head is above body
What is the purpose of a declaration?
- to tell us what type of html is being used
- to help browser render correctly
Give five examples of HTML element types.
- html
- head
- body
- img
- h1
What is the purpose of HTML attributes?
provides additional info about the contents of an element
Give an example of an HTML entity (escape character).
Ampersand - &
How do block-level elements affect the document flow?
They always start on a new line
Ex: <h1>, </h1><p>, </p><ul>, and <li></ul>
How do inline elements affect the document flow?
They continue on the same line as their neighboring elements
Ex: <a>, <b>, <em>, <img></img></em></b></a>
What are the default width and height of a block-level element?
height of the content x width of the webpage
What are the default width and height of an inline element?
exactly the width and height of the content
What is the difference between an ordered list and an unordered list in HTML?
- ordered list is numbered / alphabetized
- unordered list is bullet points
Is an HTML list a block element or an inline element?
block
What HTML tag is used to link to another website?
a / anchor tag
What is an absolute URL?
A link to a page with the domain name
What is a relative URL?
Link to a page that exists on the same website
How do you indicate the relative link to a parent directory?
ex: ../index.html
How do you indicate the relative link to a child directory?
name of the child folder, forward slash, file name
ex: music/listing.html
How do you indicate the relative link to a grand parent directory?
repeat the ../ twice to go up two folders (parent –> grandparent)
ex: ../../index.html
How do you indicate the relative link to the same directory?
value of the href attribute is just the name of the file
What are the six primary HTML elements for creating tables?
- table
- tr: table row
- th: table header
- td: table data / a cell within each row
- thead
- tbody
- tfoot
What purpose do the thead and tbody elements serve?
to separate different parts of the table, for styling purposes. also, to help people who use screen readers
Give two examples of data that would lend itself well to being displayed in a table.
- sports results
- time table (train or bus sched)
- student assessment data
- should not be used for layout features