HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element which stores the metadata. Metadata tells the browser more information about the document.
Where do you put visible content about the HTML document?
In the body element.
Where do the head and body tags go in a valid HTML document?
Within the html element. The head element is first, and stores all metadata. And the body element is second, and stores all visible content.
What is the purpose of a!DOCTYPEdeclaration?
To let the browser know what kind of document it is, so that it can properly read it.
Give five examples of HTML element tags.
head body title h1 p
What is the purpose of HTML attributes?
Attributes (which sit inside of tags) contain more information about the content of the element.
(Attributes contain values within double quotes.)
Syntax:
attribute=“value”
Give an example of an HTML entity (escape character).
© copyright character: ©
& ampersand : &
“ Quotation mark: “
(html entities / escape characters must always be followed by semicolons.)
How do block-level elements affect the document flow?
Block-level elements always start on a new line, therefore breaking up the flow of the document.
Block level elements can contain inline-level elements, but not vice versa or the block elements would break the flow.
How do inline elements affect the document flow?
Inline elements always appear to continue on the same line as their neighboring elements. They do not break up the document flow, but rather flow together seamlessly.
What are the default width and height of a block-level element?
Block-level elements always take up as much width as possible (100%). And they only take up as much height as the content inside of them.
What are the default width and height of an inline element?
Inline elements only take up as much width and height as is necessary.
What is the difference between an ordered list and an unordered list in HTML?
In ordered lists, items are listed numerically.
In unordered lists, items are listed by bullet points.
(The only valid child elements of these elements. are li elements. The li element represents an item in a list.)
Is an HTML list a block element or an inline element?
Block element. (The li elements are block elements as well.)
What HTML tag is used to link to another website?
Anchor tags (a).
a tags are used to create links to other websites or links to pages within the same website.
a tags contain the href attribute which contains the link. Within the a element, the text content is what the user will see and click on.
URLs to external sites are absolute URLs.
URLs to pages within the same site are relative URLs.
What is an absolute URL?
Absolute URLs link to external webpages.
e. g.
https: //www.google.com/
https: //www.healthline.com/health/breathing-exercise