HTML Flashcards
Minimum Example of HTML Skeleton?
<!DOCTYPE html> <html> <head> <title> HTML Skeleton </title> </head> <body> </body> </html>
Where do you put non-visible content about the HTML document?
Non-visible content (typically metadata) is placed within the <head> tags.
Where do you put visible content about the HTML document?
Visible content is placed between the <body> tags.
Where do the <head> and <body> tags go in a valid HTML document?
Both are siblings placed as children to the <html> tag.
Define block-level element
An element that occupies the entire horizontal space of its container/parent. (Starts new lines) height: auto width: 100%
Define inline element
An element that occupies only the space bounded by the tags defining that element. (Does NOT start new lines)
Height: auto Width: auto
Absolute URL
The full URL for a site including domain name and protocol.
Relative URL
A shorthand URL that does not require domain. (Other pages stored on site/project)
What does URL stand for?
Uniform Resource Locator
How do you indicate the relative link to a parent directory?
../index.html
How do you indicate the relative link to a child directory?
example/index.html
How do you indicate the relative link to a grand parent directory?
../../index.html
How do you indicate the relative link to the same directory?
index.html (only requires name of the file)
What is the purpose of an HTML form element?
To collect data from visitors. The element denotes the boundary in which the form is on the webpage.
Give five examples of form control elements.
input, text area, button, select, option
Give three examples of type attribute values for HTML <input></input> elements.
radio, text, checkbox, submit
Is an HTML <input></input> element a block element or an inline element?
Inline
What are the six primary HTML elements for creating tables?
<table></table> <-- denotes boundaries of table --> <thead></thead> <-- denotes set of rows defining head of columns of table --> <tbody></tbody> <-- denotes set of rows defining body of columns of table --> <th></th> <--table header--> <td></td> <--table cell --> <tr></tr> <--table row-->
What purpose do the <thead> and <tbody> elements serve?
Containers to separate table header and body for structural/semantic purposes
Which HTML meta tag is used in mobile-responsive web pages?
<meta name=”viewport” content=”width=device-width, initial-scale=1.0”>