HTML Flashcards
Where the non-visible content of the HTML document goes
In between the “head” element’s opening & closing tags
Where the visible content of the HTML document goes
In between the “body” element’s opening & closing tags
Where do the “head” and “body” tags go in a HTML document?
In between the “html” element’s opening & closing tags
What is purpose of the DOCTYPE declaration?
Lets browser know what version of HTML is being used (HTML5)
What is the purpose of HTML attributes?
Gives more information or data about the HTML element
Give an example of an HTML entity (escape character)
Multiplication: & # 215 ; or & times ;
Copyright: & # 169 ; or & copy ;
Give five examples of HTML element tags.
< body > , < head > , < html >, < div >, < header >
What is the difference between an unordered list & ordered list?
Unordered - bullet points
Ordered - numbers
How to build a description list?
“dl” (description list)
“dt” (description term)
“dd” (description definition)
What is an absolute URL?
Full web address for a website (domain name then path to specific page)
What is a relative URL?
Shorthand for linking to pages on the same site (don’t need to specify the domain name)
What are other ways we can use an anchor tag?
- Directing to other sections of same webpage
- Downloading files
- Link to email or phone number
How do you indicate the parent folder in a path?
.. / fileName
How do you indicate the child folder in a path?
folderName / fileName
How do you indicate the grandparent folder in a path?
.. / .. / fileName
How do you indicate the current folder in a path?
.
What are the six primary HTML elements for creating tables?
table th tr td thead tbody tfoot
What purpose do the thead and tbody elements serve?
thead - the headings sit in here
tbody - the body of the table goes here
* Helps with screen readers and styling
Give two examples of data that would lend itself well to being displayed in a table.
Schedule and pricing table
Why are forms useful?
Collects and sends user supplied data to server for processing and storage
What attribute do you have to match between a label and an input?
label - for
input - id
What type of input allows you to select multiple items in a dropdown?
“select” element + “option” elements
What is the action of a form?
Where the browser will send the form data
What is the purpose of an HTML form?
Allows you to collect data from users
Give five examples of form control elements.
text area, radio buttons, dropdown list boxes, checkbox, password input
Give three examples of type attributes for HTML input elements.
Password, text, number
Why would we use semantic elements over div or span?
- Easier to read
- Screen readers use to navigate for visually impaired
- Search engines use contents and important keywords to influence page’s search rankings
What factors contribute to a well-designed HTML document?
- Readability
- Separation of concerns
How do block-level elements affect the document flow?
Block elements display one after another, vertically
New line
Takes available width
Makes the next element take a new line after
How do inline elements affect the document flow?
Inline elements are displayed in the inline direction, horizontally
As much as the content takes up
What accessibility considerations must be considered when choosing HTML elements?
Screen readers for people with visual disabilities are better able to read semantic elements versus generic ones like div which give no additional context