HTML Flashcards
(53 cards)
What is HTML and what is it used for?
HTML is a textual language for creating webpages.
What is the format of an HTML file?
- Start with an indication of the document type
- then a head part with the page title and other page information
- Finally a body part with the actual page content
- May also contain CSS and JavaScript code
What is an HTML element?
A single HTML structure that is represented with HTML tags. Most HTML elements have an opening and closing tag.
How do you write HTML opening / closing tags for the ‘p’ element?
<p> paragraph </p>
What are common HTML elements?
- h1, h2, h3: Headers, largest to smallest
- p: paragraph
- em, strong: italics and bold
- img: image (no closing tag)
- a: Link
What are HTML tag attributes?
Special words used inside the opening tag to control the element’s behaviour.
How does an anchor element create a link on a webpage?
With the href attribute in the opening a tag. Ex: a href=”link” </a>
What is the syntax of a comment in HTML?
< ! - - Text - - >
(no whitespace normally)
What is a void element?
An element that only needs an opening tag
What tag is the first in every .html?
The “!DOCTYPE html” tag.
What is enclosed by the “html” element?
Everything but the “!DOCTYPE html” tag
What element contains other elements not typically displayed in the webpage?
The “head” element
What element describes the documents data?
The “meta” element.
What does the “title” element specify?
The Documents name, usually displayed in the browser’s titlebar,
What element contains other elements rendered in the browser?
The “body” element
Why is it smart to use an HTML validator?
To check for depreciated HTML that may be handled unpredictably by browsers.
What is the tag to create a newline?
“br”
How is whitespace handled in HTML?
Multiple whitespace and newline characters will all be treated as a single whitespace
What is an HTML container?
Any element in a web document body that has opening and closing tags.
What content is held in the head container?
Introductory content
What content is held in the footer container?
Descriptive information about the webpage like author, copyright, or date modified
What content is held in the address container?
The person’s or organization’s contact information
What content is held in the main container?
The document’s primary content
What content is held in the section container?
Distinct parts of a document, such as a chapter