HTML 5 Flashcards
What is an iframe and how it works?
An iframe is an HTML document which can be embedded inside another HTML page.
Explain meta tags in HTML
- can contain information about character encoding, description, title of the document etc.
- not displayed on the page but intended for the browser
- always passed as name/value pairs
- always go inside head tag of the HTML page
What is the purpose of the alt attribute on images?
The alt attribute provides alternative information for an image if a user cannot view it. The alt attribute should be used to describe any images except those which only serve a decorative purposes, in which case it should be left empty.
What is the difference between span and div?
div is a block element
span is inline element
How can you highlight text in HTML?
tag
<span>Hello</span>
What were some of the key goals and motivations for the HTML5 specification?
- Deliver rich content (graphics, movies, etc.) without the need for additional plugins, such as Flash.
- Provide better semantic support for web page structure through new structural element tags.
- Provide a stricter parsing standard to simplify error handling, ensure more consistent cross-browser behaviour, and simplify compatibility with documents written to older standards.
- Provide better cross-platform support whether running on a PC, Tablet, or Smartphone.
What is Character Encoding?
To display an HTML page correctly, a web browser must know which character set (character encoding) to use. This is specified in the tag:
What is a self closing tag?
In HTML5 it is not strictly necessary to close certain HTML tags. The tags that aren’t required to have specific closing tags are called “self closing” tags.
An example of a self closing tag is something like a line break (<br></br>) or the meta tag ().
How Can I Get Indexed Better by Search Engines?
place the following two statements in the part of your documents:
Both may contain up to 1022 characters. If a keyword is used more than 7 times, the keywords tag will be ignored altogether. Also, you cannot put markup (other than entities) in the description or keywords list.
Briefly describe the correct usage of the following HTML5 semantic elements: , , ,
is used to contain introductory and navigational information about a section of the page. This can include the section heading, the author’s name, time and date of publication, table of contents, or other navigational information.
is meant to house a self-contained composition that can logically be independently recreated outside of the page without losing it’s meaining. Individual blog posts or news stories are good examples.
is a flexible container for holding content that shares a common informational theme or purpose.
is used to hold information that should appear at the end of a section of content and contain additional information about the section. Author’s name, copyright information, and related links are typical examples of such content.
What’s the difference between an “attribute” and a “property” in HTML?
Attributes are defined on the HTML markup but properties are defined on the DOM.