HTML Flashcards
Where do you put non-visible content about the HTML document?
Head element
Where do you put visible content about the HTML document?
Body element
Where do the tags go in a valid HTML document?
Html element
What is the purpose of a declaration?
Tells the webpage the type of document they will be working with, typically html
Give five examples of HTML element types.
html, body, head, h1, h2, h3, h4, h5, h6, p, br
What is the purpose of HTML attributes?
Gives more direction and information on what and where the attribute will go on the webpage
Give an example of an HTML entity (escape character).
© (copyright), ® (registered trademark)
How do block-level elements affect the document flow?
They start on a new line and take up the whole length of the block. They do not allow anything on their sides. Anything left gets pushed up and anything right gets pushed down.
How do inline elements affect the document flow?
They only affect the text content that is contained within the element
General <span> used if you want text content in the same element.
</span>
What is the default width and height of a block-level element?
Same as the full width of its parent container. Height is dictated by the content.
What is the default width and height of an inline element?
The width and height are dependent on its content.
What is the difference between an ordered list and an unordered list in HTML?
Ordered list is numbered, starting from 1. Unordered lists are just listed with bullet points.
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
Anchor<a> tag element with href attribute </a>
What is an absolute URL?
The URL is a full web address that’ll link to a different website.
What is a relative URL?
This is not a full web address and links to other pages within the same website but using folders, using syntax to locate the folder in relation to the current page.
How do you indicate the relative link to a parent directory?
Use .. to indicate the folder above the current one then follow with the file name
Ex. ../index.html
How do you indicate the relative link to a child directory?
Use the name of the child folder followed by forward slash and then the file name
Ex. music/listings/html
How do you indicate the relative link to a grand parent directory?
Use the ../../ (use the 2 dots 2x)
Ex. ../../index.html
How do you indicate the relative link to the same directory?
Use the file name
Ex. reviews.html
What is the purpose of an HTML form element?
To collect information
ex. collecting info for subscribing, payment info, surveys
Give five examples of form control elements.
Input, text area, size, select, button, file, option, form
**input self closing tag after changing the type attribute will change it into many other elements
Give three examples of type attribute values for HTML elements
Hidden, image, file, submit, radio, checkbox, src, text
Is an HTML element a block element or an inline element?
Inline-block (neither or both)
It’s considered both because you can adjust the height and width while also allowing text on the side.
What are the six primary HTML elements for creating tables?
Tr(table row starts a new row), th(typically bolded and centered in the column), td(table data always horizontal), thead, tbody, col, colgroup, caption, table
What purpose do the thead and tbody elements serve?
Thead contains headings of the table
Tbody holds in all the body data that is encased within the table
Give two examples of data that would lend itself well to being displayed in a table.
Financial reports/annual reports, schedules, sports team data