HTML Flashcards
Where do you put non-visible content about the HTML document?
Non-visible content is placed in the head tag.
Where do you put visible content about the HTML document?
Visible content is placed in the body tag.
Where do the head and body tags go in a valid HTML document?
The head and body tags belong within the html tag.
What is the purpose of a !doctype declaration?
The !doctype declaration lets the browser know what the document contains and/or the version of HTML.
Give five examples of HTML element tags.
html - Encompasses the entire project. head - Used for non-visible elements. body - Used for visible elements. p - Paragraph tag. h1-h6 - Heading tags.
What is the purpose of HTML attributes?
HTML Attributes are used to edit the ‘settings’ of the targeted element.
Give an example of an HTML entity (escape character).
An escape character is used in text to encode a symbol. e.g. &’amp’ for ‘&’.
How do block-level elements affect the document flow?
Block-level elements take up an entire row of screen space and add spacing before and after the content.
How do inline elements affect the document flow?
Inline elements do not use extra spacing and simply affect the content selected.
What are the default width and height of a block-level element?
The default width of a block-level element is equal to the entire horizontal space of its parent element/container. The height is equal to its contents.
What are the default width and height of an inline element?
The default height and width of an inline element are equal to the contents.
What is the difference between an ordered list and an unordered list in HTML?
An ordered lists will add numerical bullet points to your list items while an unordered lists uses default bullet points.
Is an HTML list a block element or an inline element?
An HTML list is a block element. It takes up all horizontal space.
What HTML tag is used to link to another website?
The anchor tag, ‘a’.
What is an absolute URL?
An absolute URL is a full link to another website.
What is a relative URL?
A relative URL is the path to another file within the same server.
How do you indicate the relative link to a parent directory?
To ‘step out’ into the parent directory you would use ‘../file-name’.
How do you indicate the relative link to a child directory?
To ‘step in’ the child element you would use the folder name followed by the file name. e.g. ‘folder/filename’.
How do you indicate the relative link to a grand parent directory?
A grandparent directory would be stepping out twice. This can be done with ‘../../filename’.
How do you indicate the relative link to the same directory?
For a link to the same directory nothing but the direct filename is needed. e.g. ‘filename’.
What is the purpose of an HTML form element?
A form element is used to get values from the user and submit them to a server.
Give five examples of form control elements.
form - Used to encapsulate the form and how to send the data to the server.
input - Used to create a section for input from user.
label - Typically a question attached to an ‘input’.
textarea - Creates a textbox for longer text answers.
button - Creates a clickable button.
Give three examples of type attributes for HTML input elements.
radio - Creates a single choice prompt out of multiple answers.
checkbox - Creates a multiple choice prompt.
submit - Creates a submit button to send your answers to the server.
Is an HTML input element a block element or an inline element?
An HTML input element is an inline level element.
What are the six primary HTML elements for creating tables?
thead - Encapsulates the header of the table.
th - Differentiates and bolds the header data cells.
tbody - Encapsulates the body of the table.
tr - Creates a table row.
td - Creates a table data cell.
tfoot - Encapsulates the footer of the table.
What purpose do the thead and tbody elements serve?
The thead and tbody elements exist to seperate the header of the table and the body of the table. Very helpful for CSS purposes.
Give two examples of data that would lend itself well to being displayed in a table.
Anything with large amounts of data would be nice for a table. e.g. Accounting data/Grades/etc.