HTML 5 Flashcards

1
Q

What is an iframe and how it works?

A

An iframe is an HTML document which can be embedded inside another HTML page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain meta tags in HTML

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of the alt attribute on images?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between span and div?

A

div is a block element

span is inline element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you highlight text in HTML?

A

tag

<span>Hello</span>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What were some of the key goals and motivations for the HTML5 specification?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Character Encoding?

A

To display an HTML page correctly, a web browser must know which character set (character encoding) to use. This is specified in the tag:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a self closing tag?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How Can I Get Indexed Better by Search Engines?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Briefly describe the correct usage of the following HTML5 semantic elements: , , ,

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What’s the difference between an “attribute” and a “property” in HTML?

A

Attributes are defined on the HTML markup but properties are defined on the DOM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly