HTML5
HTML5
Topics:
● Hyperlinks
● Images
● Lists
● Display Values
● Semantic Tags
● Forms
● Tables
Practice Questions:
HTML tags are composed of three things: an opening tag, content and ending tag.
● content, and
● tags
When a web browser reads an HTML document, the browser reads it from top to bottom
and left to right. HTML tags are used to create HTML documents and render their
HTML elements communicate to the browser to render text. When the elements are
enclosed by brackets <>, they form HTML tags. Most of the time, tags come in a pair
The HTML "iframe" tag is used to display a nested webpage. In other words, it
No, you can use hyperlinks on text and images both. The HTML anchor tag defines a
Following are different HTML5 elements that are used to define the different parts of a
webpage.
What is a marquee?
Marquee is used to put the scrolling text on a web page. It scrolls the image or text up,
down, left or right automatically. You should put the text which you want to scroll within
the marquee tag.
● Color
● Date
● Datetime-local
● Email
● Time
● Url
● Range
● Telephone
● Number
● Search
● mp4
● WebM
● Ogg
Is audio tag supported in HTML 5?
Yes. It is used to add sound or music files on the web page. There are three supported
file formats for HTML 5 audio tag.
● mp3
● WAV
● Ogg
How can we create links to different sections within the same web page?
We can create several links to different sections within the same web page by using the
tag along with referencing through the use of the # symbol.
If there is no text between the tags, then what will be the outcome? Give an example?
If there is no text between the tags, then there will be nothing available to format, and
hence no formatting can be done. For instance, tags without closing tag like that of
image tag or br tag do not require any text between them, and hence no formatting will
be needed in such a case.
Where can you specify colors for table borders?
The specification of color for table borders can be made in the style sheet, and in its
absence, the same as the text color will apply.
Can we create a link that could connect to another web page when clicked on it?
Yes, we can create a link that could connect to another web page when clicked on it.
These links are called hyperlinks and use the href tag.
If there is no text between the tags, then what will be the outcome? Give an example?
If there is no text between the tags, then there will be nothing available to format, and
hence no formatting can be done. For instance, tags without closing tag like that of
image tag or tag do not require any text between them, and hence no formatting will be
needed in such a case.
Can we create a link that could connect to another web page when clicked on it?
Yes, we can create a link that could connect to another web page when clicked on it.
These links are called hyperlinks and use the href tag.
Name some new features which were not present in HTML but are added to HTML5?
What is Anchor tag and how can you open an URL into a new tab when clicked?
Anchor tag in HTML is used to link between two sections or two different web pages or
website templates. To open an URL into a new tab in the browser upon a click, we need
to add target attribute equal to _blank.
Tag Description
Tag Description
Visuals:
Tag Description
Forms:
Tag Description
What were some of the key goals and motivations for the HTML5 specification?
HTML5 was designed to replace both HTML 4, XHTML, and the HTML DOM Level 2.
Major goals of the HTML specification were to:
● Deliver rich content (graphics, movies, etc.) without the need for additional
plugins (e.g., Flash).
● Provide better semantic support for web page structure through the introduction
of new structural element tags.
● Provide a stricter parsing standard to simplify error handling, ensure more
consistent cross-browser behavior, and simplify backward compatibility with
documents written to older standards.
● Provide better cross-platform support (i.e., to work well whether running on a PC,
Tablet, or Smartphone).
● Improved support for embedding graphics, audio, and video content via the new
canvas, audio, and video tags.
● Extensions to the JavaScript API such as geolocation and drag-and-drop as well
for storage and caching.
● Introduction of “web workers”.
● Several new semantic tags were also added to complement the structural logic
of modern web applications. These include the main, nav, article, section, header,
footer, and aside tags.
● New form controls, such as calendar, date, time, email, url, and search.
What are “web workers”?
Web workers at long last bring multi-threading to JavaScript. A web worker is a script
that runs in the background (i.e., in another thread) without the page needing to wait for
it to complete. The user can continue to interact with the page while the web worker
runs in the background. Workers utilize thread-like message passing to achieve
parallelism.
Can a "section" contain "article" elements? Can an "article" contain "section" elements?
Provide usage examples?
The answer to both questions is yes; i.e., a "section" can contain "article" elements, and
an "article" can contain "section" elements.
For example, a personal dashboard page might contain a "section" for social network
interactions as well as a "section" for the latest news articles, the latter of which could
contain several "article" elements.
Conversely, an "article" might contain a "section" at the end for reader comments.
Can a web page contain multiple "header" elements? What about "footer" elements?
Yes to both. In fact, both the "header" and "footer" tags are designed to serve their
respective purposes in relation to whatever their parent “section” maybe. So not only
can the page "body" contain a header and a footer, but so can every "article" and
"section" element. In fact, a "header" should be present for all of these, although a
"footer" is not always necessary.
What is the concept of Application Cache in HTML5? What are its advantages?
HTML5 introduced the concept of Application Cache. It means that a web application is
cached, and is accessible without an internet connection.
Following are the key advantages of Application Cache.
● Offline browsing – Users can use the application even when they are offline.
● Speed – Cached resources load faster as compared to content that gets
downloaded, directly from the server.
● Reduced server load – The browser will only download updated/modified
resources from the server.
What is the difference between HTMl5 Application cache and regular HTML browser
cache?
Following are the key differences between the two.
In AppCache, we can define all the assets the browser should cache in a manifest file
(even the entire site). For fetching this content, it is not necessary for the user to have
accessed it previously. In other words, Application Cache can prefetch pages that have
not been visited at all and are thereby unavailable in the regular browser cache.
However, the browser cache will only store the pages (and associated assets) the user
has visited actually.
The AppCache allows web apps (and websites) to be made available offline, that too,
with the same speed benefits as the regular browser cache could provide only when the
user is online.
What is a meter tag? What is the difference between a progress tag and a meter tag?
The meter tag defines a scalar measurement within a known range or a fractional value.
We can also call it a gauge.
Some of the items that can be represented using meter tag are Disk usage, the
relevance of a query result, and so on.
Note: The meter tag should not be used to indicate progress (as in a progress bar). For
progress bars, use the progress tag.
-----------------------------------------------------------END-------------------------------------------------------------------