HTML Flashcards
Where do you put non-visible content about the HTML document?
Inside the head element
Where do you put visible content about the HTML document?
Inside the body element
Where do the head and body tags go in a valid HTML document?
Inside the html element
head and body are siblings
What is the purpose of a !DOCTYPE declaration?
To tell a browser which version of HTML the page is using
Give five examples of HTML element tags.
head, body, p, h1, div
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element
Give an example of an HTML entity (escape character).
Less-than sign <
Copyright symbol ©
Registered trademark ®
How do block-level elements affect the document flow?
Block level elements will always appear to start on a new line in the browser window
How do inline elements affect the document flow?
Inline elements will always appear to continue on the same line as their neighbouring elements
What are the default width and height of a block-level element?
A block-level element always starts on a new line and takes up the full width available
width: 100%
height: auto
What are the default width and height of an inline element?
An inline element does not start on a new line and only takes up as much width as necessary
width: auto
height: auto
What is the difference between an ordered list and an unordered list in HTML?
Ordered list is a list where each item in the list in numbered and unordered list is a list that begin with a bullet point
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
Links are created using the anchor tag
What is an absolute URL?
An absolute URL starts with the domain name for that site, and can be followed by the path to a specific page
What is a relative URL?
A shorthand version of absolute URLs because you do not need to specify the domain name
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
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
How do you indicate the relative link to a grandparent directory?
Repeat the ../ to indicate that you want to go up two folders, then follow it with the file name
How do you indicate the relative link to the same directory?
Just use the file name
What is the purpose of an HTML form element?
Form element allows you to collect information from visitors to your site
Give five examples of form control elements.
Text input Password input Text area Radio button Checkbox
Give three examples of type attributes for HTML elements.
type=”text”
type=”checkbox”
type=”radio”
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 element tr element td element th element thead element tbody element
What purpose do thead and tbody elements serve?
Distinguish between the main content of the table and the first row
Help people who use screen readers
Allow you to style these sections in a different manner using CSS
Give two examples of data that would blend itself well to being displayed in a table.
Income statement
Calendar schedule