HTML Flashcards
Where do you put non-visible content about the HTML document?
We put in the head tag element. The head element is a container for metadata (data about HTML document, which is not displayed). Ex) title, link.
Where do you put visible content about the HTML document?
We put in the body tag element. The body element contains the entire content of a webpage. Ex) h1, p, img.
Where do the head and body tags go in a valid HTML document?
We placed head tag element between the html tag element and the body tag element, and placed body tag element right after the end of head tag element. It should be placed between /head tag element and /html tag element.
What is the purpose of a !DOCTYPE declaration?
The purpose of a !DOCTYPE is an instruction to the web browser about what version of HTML the document is using. It helps the browser to handle and load it properly.
Give five examples of HTML element tags.
head, title, body, h1, p, a, img.
What is the purpose of HTML attributes?
An attribute gives more about the content of that element.
Give an example of an HTML entity (escape character).
©, ®, ™.
How do block-level elements affect the document flow?
Starts a new line and it uses the full width of the page or container. It also has a line break before and after the element.
How do inline elements affect the document flow?
Inline elements occupy only the space bounded by the tag defining the element.
What are the default width and height of a block-level element?
The default width of a block-level element is 100% and the default height is whatever height it needs to have.
What are the default width and height of an inline element?
I can’t set the width or height for the inline element because this element doesn’t start on a new line and only occupy just the width it requires.
What is the difference between an ordered list and an unordered list in HTML?
The ordered list will have items ordered by number. On the other hand, the unordered list will have just bullet points.
Is an HTML list a block element or an inline element?
The list elements are a block-level element.
What HTML tag is used to link to another website?
a tag href attribute.
What is an absolute URL?
It is a full URL or the entire address of the page and can be followed by the path to a specific page. If no page is specified, then the site will display the homepage.