HTML/CSS Flashcards
Where do you put non-visible content about the HTML document?
Inside of the head element
Where do you put visible content about the HTML document?
Inside of the body element
Where do the < head > and < body >tags go in a valid HTML document?
Inside the html tag
What is the purpose of a< !DOCTYPE > declaration?
To tell the browser which version of HTML the page is using
Give five examples of HTML element tags.
< head >, < title >, < body >, < h1 >, < p >
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)
& trade ; for trademark
How do block-level elements affect the document flow?
Each block-level element starts on a new line, and takes up the entire width of whatever line it occupies.
How do inline elements affect the document flow?
Each inline element only takes up as much height and width as its element; and can be nested within other blocks.
What are the default width and height of a block-level element?
width: entire line
height: size of element
What are the default width and height of an inline element?
width: size of element
height: size of element
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are lists where each item in the list is numbered vs an unordered list are lists that begin with bullet
Is an HTML list a block element or an inline element?
Block-level element
What HTML tag is used to link to another website?
the < a > tag< /a >
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. (Links to a website)
What is a relative URL?
A relative URL is shorter, but it can only be used to refer to links that reside on the same server as the page that refers them.
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.
How do you indicate the relative link to a grand parent directory?
Repeat the ../ to indicate that you want to go up two folders (rather than one).
How do you indicate the relative link to the same directory?
Just use the file name. (Nothing else is needed.)
What is the purpose of an HTML form element?
HTML forms give you a set of elements to collect data from your users.
Give five examples of form control elements.
< input >, < label >, < select >, < textarea >, < button >, < fieldset >, < legend >, < datalist >, < output >, < option >
Give three examples oftypeattributes for HTML< input >elements.
“text”, “radio”, “checkbox”, “submit”
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 >, < th >, < tbody >, < tr >, < td >