HTML Flashcards
What is the difference between an ordered list and an unordered list in HTML?
Ordered List = Numbered List
Unordered List = Bullet Point List
Is an HTML list a block element or an inline element?
List elements = ol , ul , dl
Block Element
Where do you put non-visible content about the HTML document?
Head Element
Non-visible / Metadata content is stored in the head element of the HTML document.
Where do you put visible content about the HTML document?
Body Element
All visible content on the HTML document is stored in the Body Element.
Where do the head and body tags go in a valid HTML document?
head tag goes right after the html tag
body tag is placed after the head tag
What is the purpose of a DOCTYPE declaration?
DOCTYPE declaration is used to tell the browser which version of HTML the page is using
Give five examples of HTML element types.
<p></p>
<span></span><em></em><strong></strong><h1></h1> - <h6></h6><ul></ul><ol></ol><li><a></a></li>
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element.
Give an example of an HTML entity (escape character).
© = copyright
® = registered trademark
& = ampersand(&)
How do block-level elements affect the document flow?
Block-level elements start a new line and take up 100% of the width available
height: auto;
width: 100%;
How do inline elements affect the document flow?
Inline elements do not break the flow of the document and only occupy the space bounded by its tags.
height: auto
width: auto
What are the default width and height of a block-level element?
block-level element:
height: auto;
width: 100%;
What are the default width and height of an inline element?
Inline element:
Height: auto;
Width: auto;
What HTML tag is used to link to another website?
Anchor (a) tag is used to link to another website
What is an absolute URL?
Absolute URL is used to link to a different website and will include the full URL.
e.g. https://www.google.com
What is a relative URL?
Relative URL is used to link to page within the same site and will consist of just the path name.
e.g. /project/index.html
How do you indicate the relative link to a parent directory?
Two periods and a forward slash refers to a link to the parent directory
../index.html
How do you indicate the relative link to a child directory?
child directory name followed by a forward slash and then the file in the directory
child/index.html
How do you indicate the relative link to a grand parent directory?
Two periods + Forward Slash + Two periods + Forward Slash + file name
../../index.html
How do you indicate the relative link to the same directory?
Only need the name of the file in the same directory
index.html
What is the purpose of an HTML form element?
HTML form elements allows the page to collect information from the user.
Give five examples of form control elements.
input element select element fieldset element button element textarea element legend element option element
Give three examples of type attribute values for HTML < input > elements.
Type = "radio" "checkbox" "text" "file" "submit" "password" "hidden"
Is an HTML < input > element a block element or an inline element?
HTML < input > element is an inline element
What are the six primary HTML elements for creating tables?
table thead tbody tr th td
tfoot (optional)
What purpose do the thead and tbody elements serve?
Header content of the table belong inside thead element
Body content of the table (data and such) belong inside tbody element
Give two examples of data that would lend itself well to being displayed in a table.
Grades
Calendars/Schedules
Planner
Product price comparison