HTML Flashcards
Where do you put non-visible content about the HTML document?
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?
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?
The head tag element should be placed between the html tag element and the body tag element. The body tag element should be placed between right after the closing head tag element and the closing html tag element.
What is the purpose of a !DOCTYPE declaration?
Its purpose is to let web browsers know which version of HTML documents is using. Therefore, it helps the browser process and loads 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?
It has a line break before and after the element and uses the full width of the page or container of its parent element.
How do inline elements affect the document flow?
It only occupies the space bounded by the tags defining the element.
What are the default width and height of a block-level element?
The default width of the 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. The unordered list will have just bullet points.
Is an HTML list a block element or an inline element?
It’s a block-level element.
What HTML tag is used to link to another website?
It’s 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.