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 tags. head before body
What is the purpose of a doctype declaration?
It tells the browser which version of html the page is using
Give five examples of HTML element tags.
Head, body, img, div, span
What is the purpose of HTML attributes?
To customize and change elements default settings. Give more info to an element.
Give an example of an HTML entity (escape character)
“©” = carbon copy
How do block-level elements affect the document flow?
Block-level elements always start a new line and take up the full width available
How do inline elements affect the document flow?
Inline elements don’t start a new line and only take up as much as necessary
What are the default width and height of a block-level element?
It takes up the entire height and width of the parent element
What are the default width and height of an inline element?
It only takes up as much space as needed.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are listed in number, unordered lists are bullets
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
The “a” tag or anchor tag
What is an absolute URL?
When the link goes to an entirely different site
What is a relative URL?
When you are linking to other pages within the same site
How do you indicate the relative link to a parent directory?
”../sibling”
How do you indicate the relative link to a child directory?
/child-folder/child.file
How do you indicate the relative link to a grand parent directory?
”../../uncle-folder???
How do you indicate the relative link to the same directory?
sibling.file
What is the purpose of an HTML form element?
Represents a document section containing interactive controls for submitting information
Give five examples of form control elements.
Input, textarea, select, button, label
Give three examples of type attributes for “input” HTML elements.
Text, password, hidden, radio, checkbox.
Is an HTML “input” element a block element or an inline element?
Inline element
What are the six primary HTML elements for creating tables?
Table, thead, tbody, tfoot, tr, th, td
What purpose do the thead and tbody elements serve?
They allow for styling and are helpful for people who use screen readers
Give two examples of data that would lend itself well to being displayed in a table.
Financial reports, sports statistics, publishing scientific data