HTML Flashcards
(344 cards)
Where do you put non-visible content about the HTML document?
Within the head element
Where do you put visible content about the HTML document?
Within the body element
Where do the head and body tags go in a valid HTML document?
Within the html element
What is the purpose of a ! DOCTYPE declaration?
To inform the web browser about what version of html the page is written in
Give five examples of HTML element tags.
div h1 p img article
What is the purpose of HTML attributes?
To add details/extra info to elements
Give an example of an HTML entity (Escape character)
& = & a m p ; < = & l t ; > = & g t ;
How do block-level elements affect the document flow?
It creates a line break.
How do inline elements affect the document flow?
It stays within the same line if possible and only takes as much space as needed.
What are the default width and height of a block-level element?
width: 100%
height: auto
What are the default width and height of an inline element?
width: auto
height: auto
What is the difference between an ordered list and an unordered list in HTML?
An ordered list is numbered.
An un ordered list has bullet points.
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
Anchor tag (tag for anchor element) <a href=""></a>
What is an absolute URL?
Complete web address starting with domain name (must include https://)
What is a relative URL?
Shorthand address linking parts/pages within the same website (omits domain name)
How do you indicate the relative link to a parent directory?
../filename
How do you indicate the relative links to a child directory?
directory/filename
How do you indicate the relative link to a grand parent directory?
../../filename
How do you indicate the relative link to the same directory?
its own filename
or
#id within same page
What is the purpose of an HTML form element?
Form element sets boundary /enclosure for form control elements
Give five examples of form control elements.
input select option textarea button
Give three examples of type attributes for HTML elements.
text
password
radio
checkbox
Is an HTML element a block element or an inline element?
Inline element