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?
Inside the html element.
What is the purpose of a !DOCTYPE declaration?
It tells the web browser what version of HTML the page is written in. Also helps the browser to render the page correctly
Give five examples of HTML element types.
head, body, p, h1, h2, title
What is the purpose of HTML attributes?
To provide additional information about HTML elements.
Give an example of an HTML entity (escape character).
© = &-copy or &-#174
How do block-level elements affect the document flow?
Its creates a block of text with a newline before and after the element.
How do inline elements affect the document flow?
They occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
What are the default width and height of a block-level element?
It occupies the entire horizontal space of its parent element, and vertical space equal to the height of its contents.
What are the default width and height of an inline element?
The content would define the width and the height of the element.
What is the difference between an ordered list and an unordered list in HTML?
Ordered list is a numbered list, Unordered list is a list that uses bullet points.
Is an HTML list a block element or an inline element?
A block element.
How do you indicate the relative link to a parent directory?
Use ../ to indicate the folder above the current one and then the file name.
How do you indicate the relative link to a child directory?
For a child folder, use the name of the child folder,
followed by a forward slash, then the file name.
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), then follow it with the
file name
How do you indicate the relative link to the same directory?
To link to a file in the same folder, just use the file
name.
What is the purpose of an HTML form element?
The form element inserts a component designed to contain controls that users can interact with to send information back to the server. Allows the user to do things as well
Give three examples of type attribute values for HTML input elements.
Text, Checkbox, Radio, Number
Give five examples of form control elements.
form, input, label, select, textarea, button, datalist
Is an HTML input element a block element or an inline element?
Inline-block: allows you to set up height and width.
What are the six primary HTML elements for creating tables?
Table, tr, td, th, thead, tbody, tfoot
What purpose do the thead and tbody elements serve?
They help to organize a long table.
Give two examples of data that would lend itself well to being displayed in a table.
Sports results, stock reports, travel timetables