HTML Flashcards
Where do you put non-visible content about the HTML document?
head
Where do you put visible content about the HTML document?
body
Where do the head and body tags go in a valid HTML document?
Between the html tags.
head and body tags are siblings
What is the purpose of the !DOCTYPE declaration?
To indicate the HTML version
Give 5 examples of HTML element tags.
P Span img h1 h2
What is the purpose of HTML attributes?
provides additional information about elements.
give an example of an HTML entity (escape character).
& amp = ampersand (&)
no space between & and amp
How do block-level elements affect the document flow?
Causes a line break.
How do inline elements affect the document flow?
Continues on the same line.
What are the default width and height of a block-level element?
Width = 100% of the parent element's width Height = tall as its contents
What are the default width and height of an inline element?
Only takes up as much width and height as necessary (Auto)
What is the difference between an ordered list and an unordered list in HTML?
Ordered list = Items are numbered to indicate there is an order
Unordered = Items begin with a bullet point or other symbol
Is an HTML list a block element or an inline element?
BLOCK
What HTML tag is used to link to another website?
anchor tags
What is an absolute URL?
It is the full address.
Used to link to an external website.
What is a relative URL?
Shorthand where you don’t need to specify the domain name.
Used for internal navigation.
How do you indicate the relative link to a parent directory?
../file-name
How do you indicate the relative link to a child directory?
child-directory/file-name
How do you indicate the relative link to a grandparent directory?
../../file-name
How do you indicate the relative link to the same directory?
just use the file name
What is the purpose of an HTML form element?
To allow users to submit information to the server.
Contains user form input elements
Give 5 examples of form control elements.
Input, Label, Textarea, Select, Option
Give 3 examples of type attributes for HTML input elements.
Text, Checkbox, Color
Is an HTML input element a block element or an inline element?
Inline
What are the six primary HTML elements for creating tables?
table, thead, tbody, th, tr, td
What purpose do the thead and tbody elements serve?
Semantic reasons, helps people with screen readers, allows you to style them differently
Give two examples of data that would lend itself well to being displayed in a table?
Financial Statements, Comparing features on multiple items