HTML Flashcards
Where do you put non-visible content about the HTML document?
Within the head tags
Where do you put visible content about the HTML document?
Within the body
Where do the and tags go in a valid HTML document?
They go within the HTML tags
What is the purpose of a declaration?
Notify browser the type of doc and the version of HTML
Give five examples of HTML element tags.
Body html a p div
What is the purpose of HTML attributes?
Give additional information on the tags
«a>a</a> href=”…” style=”color:red;”>test«a>a</a>>
Give an example of an HTML entity (escape character).
<a>&</a>copy; = © <a>&</a>reg; = ®
How do block-level elements affect the document flow?
Block elements stand alone and create line breaks
How do inline elements affect the document flow?
Inline elements will stay right where they are, and will not cause a break in the text
What are the default width and height of a block-level element?
Width: full available space
Hight: amount needed to show text, unless restricted
What are the default width and height of an inline element?
It would auto-adjust to the width and height of the content around it
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists have correlating numbers, which give them a sequence
Unordered lists are bullet points with no indication of sequencing
Is an HTML list a block element or an inline element?
It is a block element
What HTML tag is used to link to another website or other location?
Anchor tag with href
«a>a</a> href=”link.com”>link«a>a</a>>
What is an absolute URL?
Absolute URLs give the direction to the HTML page from the very beginning.
This allows there to be no confusion or issues for the source of the link
What is a relative URL?
Relative URLs are links given to the page, which are dependant to the current location of the document, itself
It gived directions for how the document can navigate from the current directory to the location of the file
How do you indicate the relative link to a parent directory?
We need to use two dots and a slash
../image.jpg
First dot indicated current directory
The second dot indicated one up
How do you indicate the relative link to a child directory?
Form the current directory, you tell it the file to go into, then the file within the file
/image/river.jpg
How do you indicate the relative link to a grandparent directory?
You would need to go up two directories. So it is the same as #1, but twice
../../mainstyle.css
How do you indicate the relative link to the same directory?
There are two ways
./file.txt
file.txt
What is the purpose of an HTML form element?
Allows the developer to retrieve information from users
Give five examples of form control elements.
Input Textarea Select Option Button
Give five examples of “type” attributes for HTML From elements.
Radio Text Submit Checkbox Password
Is an HTML element a block element or an inline element?
inline
What are the six primary HTML elements for creating tables?
table thead tr th th tbody tr td td tfoot tr td td
What purpose do the thead and tbody elements serve?
They assist with screen readers and also help with SEO
Give two examples of data that would lend itself well to being displayed in a table.
Grades
Recipes
Anything that would fit well in excel