HTML Quiz Questions Flashcards
Where do you put non-visible content about the HTML document?
Within the < head > element
Where do you put visible content about the HTML document?
Within 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?
Declaration of the document type, so the browser knows what to expect
What is the purpose of HTML attributes?
Provide additional information/context about elements.
Give an example of an HTML entity (escape character).
©
‘
“
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered (1, 2, 3, 4)
Unordered lists are bulleted
What three HTML elements do you use to build a description list?
< dl >
< dt >
< dd >
What is an absolute URL?
Links to a website (https)
What is a relative URL?
Usually a local address, within the same machine such as images in a folder.
What other ways can we use an anchor tag?
Navigating to a section on the same page
How do you indicate the parent folder in a path?
”../”
How do you indicate the child folder in a path?
“/child-folder/”
How do you indicate the grand parent folder in a path?
”../../”
How do you indicate the current folder in a path?
”./”
What are the six primary HTML elements for creating tables?
< table > < thead > < tbody > < th > < tr > < td >
What purpose do the thead and tbody elements serve?
Defines the start of the table headers and the table body
Give two examples of data that would lend itself well to being displayed in a table.
student names + grade
menu + prices
Why are forms useful?
Ability to receive data from users
What attribute do you have to match between a label and an input?
< label for = “same”
What type of input allows you to select multiple items in a dropdown?
< select >
What is the action of a form?
Defines where data will be sent
What is the purpose of an HTML form element?
Defines a set of elements to collect data from users
Give five examples of form control elements.
< form > < input > < select > < option > < button > < label > < datalist >
Give three examples of type attributes for HTML < input > elements.
< input type=”text”, “radio”, “password”, “file”
Why would we choose specific element types when we have elements such as div and span which can be used for anything?
To be more descriptive and to make it more intuitive to edit and style different elements
What factors contribute to a well-designed HTML document?
Well organized/structured code.
Separation of concerns.
Proper use of elements for context and descriptions.