HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element (title of the tab) Before the element you will often see a element. This contains information about the page (rather than
information that is shown within the main part of the browser window that is highlighted in blue on the opposite page). You will usually find a element inside the element.
Where do you put visible content about the HTML document?
Everything inside the element is shown inside the main browser window.
Where do the and tags go in a valid HTML document?
They go within the HTML element and are sibling elements to the head element as well as to each other. (Head element goes first and then body follows after)
What is the purpose of a declaration?
To tell a browser which version of HTML the page is using.
What tags are necessary for a complete HTML Skeleton?
What type of content belongs within the of an HTML document?
The element contains meta information about the HTML page.
What type of content belongs within the of an HTML document?
The element defines the document’s body and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
Where must the DOCTYPE declaration appear in a valid HTML document?
The declaration defines that the document is an HTML5 document and appears at the very top of the document.
Give five examples of HTML element types.
<p> </p>
<div></div>
What is the purpose of HTML attributes?
Attributes tells us more about elements. Attributes provide additional information
about the contents of an element. They appear on the opening tag of the element and are
made up of two parts: a name and a value, separated by an equals sign.
Give an example of an HTML entity (escape character).
There are some characters that are used in and reserved by HTML code. (For example, the
left and right angled brackets.) Therefore, if you want these characters to appear on your page you need to use what are termed “escape” characters (also known as escape codes or entity references). For example, to write a left angled bracket, you can use either < or <. For an ampersand, you can use either & or &.
How do block-level elements affect the document flow?
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”. Browsers typically display the block-level element with a newline both before and after the element. You can visualize them as a stack of boxes. A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can). Block-level elements may appear only within a element.
How do inline elements affect the document flow?
Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content. Appears on the same line as the element it is occupying.
What are the default width and height of a block-level element?
A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).
What are the default width and height of an inline element?
An inline element does not start on a new line and only takes up as much width as necessary. Based on the content that surrounds the element. They will never be bigger than their content.