HTML Flashcards
Where do you put non visible content about the HTML document?
Non-visible content, known as metadata (or data about data), is stored in the element. This data includes page description, keywords, author, charset, etc.
Where do you put visible content about the HTML document?
Visible content, content that is seen on the page, is stored in the element. The body contains all the visible content of an HTML document, such as the headings, paragraphs, images, lists, hyperlinks, etc.
Where do the and tags go in a valid HTML document?
The element is placed between the tag and the tag. The tag is placed after the closing tag and before the closing tag.
What is the purpose of a declaration?
The DOCTYPE declaration tells the browser what version of markup language (HTML, XML) in which a webpage is written.
Give five examples of HTML element types.
Metadata elements: , ,
Root elements:
Content Sectioning: , <h1>, <h2>, ,
Text content: <div>, <li>, , <ol>, <p>, </p></ol><ul>
Inline: <a>, <b>, <em>, , <span></span></em></b></a></ul></li></div></h2></h1>
What is the purpose of HTML attributes?
Elements in HTML have attributes, which are values that configure the elements or adjust their behavior in various ways.
Give an example of an HTML entity (escape character).
Inverted question-mark ( ¿ ): ¿
How do block-level elements affect the document flow?
In normal flow, block-level elements stack upon each-other, occupying the entire width of the parent container. A block-level element always starts on a new line and the browser automatically adds some space (a margin) before and after the element.
How do inline elements affect the document flow?
Inline elements sit inside the content of block-level elements. Their size is the just the required size of their content. You cannot set width or height on inline elements without setting it to behave like a block level element.
What are the default width and height of a block-level element?
The default width of a block-level element is 100% of the width of its parent container. The default height is the height of the content.
What are the default width and height of an inline element?
The default width and height of an inline element are the width and height of the content.
What is the difference between an ordered list and an unordered list in HTML?
An ordered list <ol> has items ordered by number while an unordered list </ol><ul> simply has bullet points.</ul>
Is an HTML list a block element or an inline element?
An HTML list is a block element. This applies to both the ul, ol elements as well as li elements.
What HTML tag is used to link to another website?
To link to another website, we use the <a> tag which defines a hyperlink. The </a><a> element has its href attribute, which indicates the destination of the link.</a>
What is an absolute URL?
An absolute URL is the full URL, including the protocol ((HTTP, HTTPS), the option subdomain (www), domain (example.com), and path (example.com/about).