HTML Flashcards
Where do you put non-visible content about the HTML?
In the head element.
Define Meta-data.
Meta-data is data that provides information about another set data. This is inside the head element and usually provides a description of the page. It is not displayed on the page.
Where do you put visible content about the HTML document?
In the < body > element.
Everything in the element has the potential to be visible.
Where do the < head > and < body > tags go in a valid HTML document?
< head > goes after the opening tag of the < html > element.
< body > goes after the closing tag of the < head > < /head > element.
What is the purpose of the < h t m l > declaration?
- Each web page should begin with a HTML declaration in order to tell the browser which version of HTML the page is using, because there are several versions of them.
- Also helps the browser render a page correctly.
- AKA it tells us what kind of document it is.
Give 5 examples of element types.
html, head, title, body, and h1.
What is the purpose of HTML attributes?
- They are in the opening tag of the element to provide more information about the content.
- example: <a> </a>
- Made of 2 parts: a name and a value.
-another example: lang in <p> helps specify what language is being used. </p>
Give an example of HTML entity (also known as “escape characters”).
& copy would be ©
& reg would be ®
(no spaces for the special escape characters)
Fill in the blank:
The terms “tag” and “element” are _____________.
The terms “tag” and “element” are interchangeable.
What kind of element is the < img > element?
< img > is called an “empty element” or also called a “self-closing tag,” because it does not require a closing tag.
What does src define?
src tells the browser where to find the image file. This will usually be a relative URL pointing to an image.
What does alt define?
alt gives a text description of the image in case it does not load properly due to a slow connection or for viewers who use screen readers.
What is the purpose of the title attribute?
The title attribute within the < img > element gives additional information about the image. It should give an accurate description of the image content so it can be understood by screen reader software or the visually impaired.
What should you put as the alt attribute within the <img></img> element if the image is purely for aesthetics and has no meaning? For instance, the dividing line.
The attribute should still be used but the quotes should be left empty.
What is the difference between the < p > and < span > elements?
Both elements displays text content, but the < p > element is a block element and the < span > element is an inline element.
How do block-level elements affect the document flow?
Block-level elements will create a new line.