HTML Flashcards
Where do you put non-visible content in the HTML document?
In the head tags
Where do you put visible content in the HTML document?
In the body tags
Where do the head and body tags go in a valid HTML document?
Inside the html tags
What is the purpose of a declaration?
To tell the browser what version of HTML the page is using
Give five examples of HTML element types.
p ;h1 ; span; div; img
What is the purpose of HTML attributes?
To tell us more about the content of that element | functionality
Give an example of an HTML entity (escape character).
$ ; % ; & ; ‘
How do block-level elements affect the document flow?
Always appear at the start of a new line
How do inline elements affect the document flow?
Always appear on same line as neighboring elements
What are the default width and height of a block-level element?
100% of its parent container; height is determined by size of content within the tags
What are the default width and height of an inline element?
Based on size of the content the inline element surrounds
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered(steps in a recipe or instructions) and unordered lists are not(bullet points)
Is an HTML list a block element or an inline element?
block
What HTML tag is used to link to another website?
<a> tag</a>
What is an absolute URL?
URL that directs to a different website; Want absolute URLS to open in another tab, use target=”_blank” inside anchor tag
What is a relative URL?
URL that links to a different page within the same website
How do you indicate the relative link to a parent directory?
Use ../ to indicate the folder above the current one
How do you indicate the relative link to a child directory?
Use the name of the child folder -> forward slash -> file name
How do you indicate the relative link to a grand parent directory?
Repeat the ../ to indicate the folder above the current one, then file name
How do you indicate the relative link to the same directory?
Exercise
Just use file name
What is the purpose of an HTML form element?
Allow the user to input information; allow webpage to collect information
Give five examples of form control elements.
Drop down list, checkbox, text input, text area, file input
Give three examples of type attribute values for HTML elements.
type, name, value, text, radio, checkbox
Is an HTML element a block element or an inline element?
inline