HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element
Where do you put visible content about the HTML document?
In the body element
Where do the head and body tags go in a valid HTML document?
Within the HTML opening and closing tags. Head goes first and body goes after
What is the purpose of a declaration?
To let the browser know that it is HTML
Give five examples of HTML element tags.
doctype declaration, html, head, title, body, header
What is the purpose of HTML attributes?
to modify elements
Give an example of an HTML entity
an HTML entity is a character that would be interpreted one way by the code editor, so we substitute it with other characters and symbols.
What are the default width and height of an inline element?
Both auto
What are the default width and height of a block-level element?
Default width: 100%
Default height: auto
How do inline elements affect the document flow?
inline elements will occupy as much space as they need to
How do block-level elements affect the document flow?
block-level elements will take up the whole width and then start a new line
Is an HTML list a block element or an inline element?
block
What is the difference between an ordered list and an unordered list in HTML?
ordered has numbers while unordered will be bullet points
What HTML tag is used to link to another website?
anchor tag
What is an absolute URL?
an absolute URL is the full address of the path to a specific page
What is a relative URL?
a relative URL is for when you do not need to specify the domain name and the page is in a folder that you are using
How do you indicate the relative link to a parent directory?
You include ../ in the file path to indicate that is in the older above the current one and then use the file name
How do you indicate the relative link to a child directory?
You use the folder name of the child directory and then the file name
How do you indicate the relative link to a grandparent directory?
You use ../../ at the beginning of the file path to indicate that you are specifying the folder that is above you 2x. Top it off with the file name
How do you indicate the relative link to the same directory?
You just use the file name
What is the purpose of an HTML form element?
It allows users to interact with the page, insert data, and choose options
Give fixe examples of form control elements:
there is input, textarea, select, option, label, button, fieldset, legend
Give three examples of type attributes for HTML input elements
text, password, radio, checkbox, file, submit, image
Is an HTML input element a block element or an inline element?
an input element is inline
What are the six primary HTML elements for creating tables?
table, tr, td, th, theader, tbody, tfoot
What purpose do the thead and tbody elements serve?
thead is for creating a header for the columns of your table and tbody is where you will input most of the data for your table
Give two examples of data that would lend itself well to being displayed in a table
large amounts of data, phone numbers, charts, etc.