HTML Flashcards
HTML-skeleton
Where do you put non-visible content about the HTML document?
in between the head element
HTML-skeleton
Where do you put visible content about the HTML document?
in between the body element
HTML-skeleton
Where do the head and body tags go in a valid HTML document
in between the html tag
HTML-skeleton
What is the purpose of a !DOCTYPE declaration?
to tell a browser which version of HTML is used
HTML-syntax
Give five examples of HTML element types
p tag, body tag, head tag, h1 tag, h2 tag, img tag, etc
HTML-syntax
What is the purpose of HTML attributes?
= to provide additional information about the contents of an element.
= to give functionality to an element
HTML-syntax
Give an example of an HTML entity (escape character)?
less-than sign, greater-than sign, cent sign, ampersand (&) sign, quotation mark, copyright symbol, etc.
HTML-block and line
How do block-level elements affect the document flow?
= block level elements will always appear to start on a new line in the browser window.
HTML- block and inline
How do inline elements affect the document flow?
inline elements will always appear to continue on the same line as their neighboring elements.
HTML- block and inline
What are the default width and height of a block-level element?
width: 100%
height: auto
HTML- block and inline
What are the default width and height of an inline element?
auto (size of the content)
HTML - lists
What is the difference between an ordered list and an unordered list in HTML?
ordered list is numbered list,
unordered list is bullet point list
HTML- lists
Is an HTML list a block element or an inline element?
block element
HTML-links
What HTML tag is used to link to another website?
anchor tag (a) element
HTML-links
What is an absolute URL?
= contains the entire address from the protocol (HTTPS) to the domain name (www.example.com).
= a full URL that’s linking out to another website that is not using the same server as your website.
HTML-links
What is a relative URL?
= a URL that only contains the location following the domain. (Only includes the path)
= It assumes that the link you add is on the same site and is part of the same root domain.
HTML-relative links
How do you indicate the relative link to a parent directory?
= use ../ to indicate the folder above the current one
ex. ../index.html
HTML-relative links
How do you indicate the relative link to a child directory?
= just putting child directory name.
ex. music/listings.html
HTML-relative links
How do you indicate the relative link to a grand parent directory?
= indicating ../../
ex. ../../index.html
../ is linking FROM the parent, linking downwards.
HTML-relative links
How do you indicate the relative link to the same directory?
= providing the file name
ex. reviews.html
HTML-forms
What is the purpose of an HTML form element?
= to create and control the core HTML structure that contain interactive controls for submitting information.
HTML-forms
Give five examples of form control elements
= input, select, text area, option, form
HTML-forms
Give three examples of type attribute values for HTML input elements.
type=”checkbox”
type=”radio”
type=”text”
HTML-forms
Is an HTML input element a block element or an inline element?
= inline element
HTML-tables
What are the six primary HTML elements for creating tables?
= table element, thead, tbody, th (table header), tr (table row), and td (table data)
HTML-tables
What purpose do the thead and tbody elements serve?
= thead: defines a set of rows defining the head of the columns of the table.
= tbody: encapsulates a set of table rows (tr elements), indicating that they comprise the body of the table (table element).
HTML-tables
Give two examples of data that would lend itself well to being displayed in a table
= stock data, sports results, and train schedule