HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element.
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?
Both the <head> and <body> elements go in the <html> element. The <head> element comes before the <body> element.
What is the purpose of a <!DOCTYPE> declaration?
It clarifies to the browser which version of HTML we are using so that it can display the page properly.
Give five examples of HTML element types.
<html> element, <head> element, <title> element, <body> element, <p> element
</p></body></title></head></html>
What is the purpose of HTML attributes?
Attributes provide more information about the contents of an element, and are comprised of a name and value.
Give an example of an HTML entity (escape character).
< is needed to write a left-angled bracket, since the left-angled bracket is symbol used in HTML syntax.
How do block-level elements affect the document flow?
These elements will appear to start on a new line of the page.
How do inline elements affect the document flow?
These elements will appear to continue right after the last element, in-line with eachother.
What are the default width and height of a block-level element?
Default width is the entire horizontal space of the its parent element, and height is the vertical length of the contents.
What are the default width and height of an inline element?
Default width and height are determined by how much space the contents of the element take up.
What is the difference between an ordered list and an unordered list in HTML?
An ordered list is numbered, whereas an unordered list will simply be broken down in bullet points.
Is an HTML list a block element or an inline element?
Lists are block elements.
What HTML tag is used to link to another website?
The <a> tag followed by an href attribute.</a>
What is an absolute URL?
An absolute URL is a uniform resource locator that contains the full web address you would type into a browser if you wanted to visit a specific page on the web.