HTML Flashcards
HTML Skeleton
Where do you put non-visible content about the HTML document?
In the head element
HTML Skeleton
Where do you put visible content about the HTML document?
Within the body elements
HTML Skeleton
Where do the head and body tags go in a valid HTML document?
Between opening and closing tags of HTML elements
HTML Skeleton
What is the purpose of a !DOCTYPE declaration?
To tell a browser which version of HTML the page is using. And DOCTYPE can also help the browser to render a page correctly
HTML Syntax
Give five examples of HTML element types.
p, img, header, footer, mark
HTML Syntax
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element
HTML Syntax
Give an example of an HTML entity (escape character).
Less-than sign: <
Greater-than sign: >
Ampersand: &
HTML Block and Inline
How do block-level elements affect the document flow?
Block-level element always starts on a new line
HTML Block and Inline
How do inline elements affect the document flow?
Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
HTML Block and Inline
What are the default width and height of a block-level element?
The default height of a block-level element is the height of the content
The default width of a block-level element is the length of the page
HTML Block and Inline
What are the default width and height of an inline element?
The height and width of an inline element are exactly the height and width of the content.
HTML Lists
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists use numbers and unordered lists use bullet points.
HTML Lists
Is an HTML list a block element or an inline element?
Block element
HTML Links
What HTML tag is used to link to another website?
a tag
HTML Links
What is an absolute URL?
- link to a different website
- An absolute URL starts with the domain name for that site, and can be followed by the path to a specific page.
HTML Links
What is a relative URL?
The relative URL is when you link to other pages within the same site.
HTML Relative Links
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
HTML Relative Links
How do you indicate the relative link to a child directory?
Use the name of the child folder, followed by a forward slash, then the file name.
HTML Relative Links
How do you indicate the relative link to a grandparent directory?
Repeat ../ to indicate the folder above the current one, then follow it with the file name.
HTML Relative Links
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
HTML Forms
What is the purpose of an HTML form element?
To collect information from visitors
- capture data from users
- users to input information
HTML Forms
Give five examples of form control elements.
select, textarea, submit, button, upload, input, form
HTML Forms
Give three examples of type attribute values for HTML elements.
Password, text, checkbox, radio, email
HTML Forms
Is an HTML element a block element or an inline element?
inline element
HTML Tables
What are the six primary HTML elements for creating tables?
Table, tr (table row), td (table data), th (table heading), thead, tbody
HTML Tables
What purpose do the thead and tbody elements serve?
- Help distinguish between the main content of the table and the first and last rows (which can contain different content)
- Help people who use screen readers and also allow you to style these sections in a different manner than the rest of the table
- The tbody element, along with its cousins thead and tfoot, provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes.
HTML Tables
Give two examples of data that would lend itself well to being displayed in a table.
A day of the week and a person and their age