HTML Flashcards
Where do you put non-visible content about the HTML document?
In the <head></head> head element.
Where do you put visible content about the HTML document?
In the <body></body> body element.
Where do the <head> and <body> tags go in a valid HTML document?
Within the <html></html> html element as sibling elements.
What is the purpose of a <!DOCTYPE> declaration?
To inform the browser which version of HTML is being used. IT also is used to help the browser render css, box model and the page correctly. If xhtml is used, the doctype will start with DOCTYPE XML
Give five examples of HTML element types.
head body img p h1 - h6 title
What is the purpose of HTML attributes?
They provide additional information about the contents of the element appearing on the opening tag with a name separated with the value.
Give an example of an HTML entity (escape character).
© , ® , < , > , & , " , ™ , × , ÷ , ‘ , ’ , “ ,
How do block-level elements affect the document flow?
It creates a new line before and after affecting the document flow of line breaks but can be changed using CSS.
How do inline elements affect the document flow?
Inline elements DO NOT force a new line to begin.
What are the default width and height of a block-level element?
The elements take the entire horizontal space of its parent element (container) and the vertical space equal to the height of its contents. Auto 100%
What are the default width and height of an inline element?
They occupy the space bounded by the tags surrounding it and takes up as much width as necessary.Auto Auto.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered while unordered lists are bulleted.
Is an HTML list a block element or an inline element?
HTML lists are a block element.
What HTML tag is used to link to another website?
The anchor a tag with an href set to a link.
What is an absolute URL?
This is a uniform resource locator or a link/address to another website on a different domain name.
What is a relative URL?
This is a linking Uniform Resource Locator to other pages within the same site.
How do you indicate the relative link to a parent directory?
../(link)
How do you indicate the relative link to a child directory?
/directory/(link)
How do you indicate the relative link to a grand parent directory?
../../(link)
How do you indicate the relative link to the same directory?
(link)
What is the purpose of an HTML form element?
be a boundary for all the form elements
Give five examples of form control elements.
input, textarea, button, option, select
Give three examples of type attribute values for HTML <input></input> elements.
email, radio, checkbox, username
Is an HTML <input></input> element a block element or an inline element?
inline
What are the six primary HTML elements for creating tables
thead, tbody, th, tr, td, and table
What purpose do the thead and tbody elements serve?
semantic and structural organization for SEO.
Give two examples of data would lend itself well to being displayed in a table.
Financial reports, data, sports stats, etc.