HTML Flashcards
HTML-SKELETON
Where do you put non-visible content about the HTML document?
Within the head element
HTML-SKELETON
Where do you put visible content about the HTML document?
Within the body element
HTML-SKELETON
Where do the head and body tags go in a valid HTML document?
in the HTML element
HTML-SKELETON
What is the purpose of a !DOCTYPE declaration?
To let the web browser know which version of HTML the page is written in
HTML-SYNTAX
Give five examples of HTML element types.
head, body, h1, p, div, etc.
HTML-SYNTAX
What is the purpose of HTML attributes?
Attributes define additional characteristics or properties of the element
HTML-SYNTAX
Give an example of an HTML entity (escape character).
&co py; (remove space between co and py) for copyright symbol, etc.
HTML-BLOCK-AND-INLINE
How do block-level elements affect the document flow?
takes all the space horizontally (width) and as much space as it needs vertically.
HTML-BLOCK-AND-INLINE
How do inline elements affect the document flow?
uses the space within the block. Does not start a new line.
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?
width: auto;
height: auto;
HTML-LISTS
What is the difference between an ordered list and an unordered list in HTML?
ordered list = numbered list, etc.
unordered list = bullet points, etc.
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?
a tag (anchor) with href=”…link”>click here
HTML-LINKS
What is an absolute URL?
a link that is a website link
HTML-LINKS
What is a relative URL?
A link that is in internal (the same website)
i.e. /file.html
HTML-RELATIVE-LINKS
How do you indicate the relative link to a parent directory?
../foldername(if any)/filename
HTML-RELATIVE-LINKS
How do you indicate the relative link to a child directory?
foldername(if any)/filename
HTML-RELATIVE-LINKS
How do you indicate the relative link to a grand parent directory?
../../foldername(if any)/filename
HTML-RELATIVE-LINKS
How do you indicate the relative link to the same directory?
filename
HTML-FORMS
What is the purpose of an HTML form element?
represents a document section containing interactive controls for submitting information.
HTML-FORMS
Give five examples of form control elements.
select, option, input, button, textarea, etc
HTML-FORMS
Give three examples of type attribute values for HTML input elements.
radio, checkbox, value, etc
HTML-FORMS
Is an HTML input element a block element or an inline element?
inline
Others: What is the difference between div and span?
div = default for block element span = default for inline element
HTML-FORMS Others:
What is the purpose of “name” attribute in radio inputs?
makes sure you can only choose one option
HTML-TABLES
What are the six primary HTML elements for creating tables?
table, thead, tbody, th, tr, td
HTML-TABLES
What purpose do the thead and tbody elements serve?
thead = for header column tbody = for content itself
HTML-TABLES
Give two examples of data that would lend itself well to being displayed in a table.
city and populations
students and grades