HTML_5
HTML_5
</body>
</html>
iii. head:
HTML metadata(data about data) is data about the HTML document. The
<head> element is a container for metadata and is placed between the <html>
tag and the <body> tag. Metadata typically define the document title, character
set, styles, links, scripts, and other meta information.
iv. title:
Most HTML documents must have a <title> element. However, the <title>
element can be omitted in cases where a higher-level protocol provides title
information. The title is usually displayed at the top of the browser’s title bar.
v. body:
The HTML <body> tag defines the section of the HTML document or the main
content of the HTML document that will be directly visible on your web pages.
2) HTML TAGS
HTML Tags are used to create HTML documents and render their properties.
Each HTML tags have different properties, HTML tag contains three main
parts: opening tag, content and closing tag. But some HTML tags are unclosed
tags.
Semantic Elements
A. Document Structure Tags
a) Div
Div Tag is a container that was mostly used with ‘id’ and ‘class’
attributes. However, with the release of HTML%, we have several
new tags to work with that provide semantic meaning in addition
to the grouping attributes offered by the div tag.
b) Header
Header is a container to be used for a web page header which
typically contains the site logo, heading, elements, and site
navigation.
c) Footer
Footer is a container to be used for a web page footer which
typically contains authorship, contact, and copyright information
in addition to navigational links and a link back to the top of the
web page.
d) Main
Main is a high-level container to be used to contain all of the
content that is unique to a single web page and not repeated
across multiple web pages.
e) Aside
Use to identify content that related to the main content on the
page but not part of the primary flow of the document.
f) Nav
Nav is the container to contain blocks of site navigation links. This
element is typically placed in the page header and footer, and may
also be used in an aside (sidebar) element as well.
g) Section
The section element is used to mark off sections of a document,
such as chapters or major sections of a long form posts.
h) Article
The <article> element is a good choice to contain entire blog
posts, news articles, and similar content. It identify a block of
content suitable for reuse and syndication.
Other tags
<hr>
b) Paragraphs
The HTML <p> element represents paragraph of text. Headings are
often followed by supporting paragraphs.
c) Strong
Text in any element of the page deserving prominent attention can be
marked as strong element. It assigns importance to the contained
word or phrase. It also makes the text bold.
d) Emphasis(em)
Em signifies emphasized contents. It is displayed in Italic Style. A
software reading the text would pronounce the words with a stressed
emphasis.
Other Tags
<abbr>, <acronym>, <bdo>, <blockquote>, <cite>, <q>, <code>, <ins>,
<del>. <dfn>, <kbd>, <pre>, <samp>, <var>, and <br>.
<html>
<head>
<title>Paryavaran Activities</title>
<head>
<body>
C. Multimedia Type Tags
Multimedia can be almost anything you can hear or see. Examples are images,
music, sound, videos, records, films, animations, and more.
Web pages often contain multimedia elements of different types and formats.
Audio, video, and animation have been handled differently by the major
browsers.
a) Audio
Used to add one or more sources of audio content to a document and to
allow the browser to pick the best option based on the visitor’s device
and browser.
The HTML5 <audio> element specifies a standard way to embed an
audio in a web page. It supports audios of mp3, wav and ogg audio
format. Other formats may require plugins to play audio.
b) Video
Used to add one or more sources of video content to a document and to
allow the browser to pick the best option based on the visitor’s device
and browser.
The HTML5 <video> element specifies a standard way to embed a video
in a web page. It supports videos of mp4, webM and ogg video format.
Other formats may require plugins to play video.
c) Picture
Image (img)
Images are very important to beautify as well as to depict many
complex concepts in simple way on your web page. <img> tag is
used to insert image in the document. The <img> tag is an empty
tah and require ‘src’ and ‘alt’ attribute.
HTML5 supports formats like png,jpeg,gif etc.
<picture> element
The picture element is used to allow a web browser to pick the
best image from the available source options based on the results
of a media query. It works if atleast one <img> element is placed
inside the <picture> container. <img> element should be placed as
last element as <source> elements won’t work if placed after
<img>.
OTHER TAGS
<area>, <map>, <param> and <object>
Examples using multimedia elements:
<!DOCTYPE html>
<html>
<head>
<title>Paryavaran Activities</title>
</head>
<body>
</audio>
</video>
<picture>
<picture>
</body>
</html>
D. Correlation Tags
Several HTML elements are used to signal a correlation between multiple
elements. For example, the use of an ordered list (ol) tells the browser that the
items on the list are related to each other and need to appear in a specific
order.
Q.4) Lists
HTML uses following two kinds of lists:
1. Ordered Lists
2. Unordered Lists
1. Ordered Lists
Ordered list element display list of items that start with a number or
letter and continue in sequence.
2. Unordered Lists
Unordered list element display the sequence of list items that start with
a bullet like a dot, circle or a square. Following options are available to
display sequence:
Disc ( )
Circle (o)
Square ( )
To define the type of list required, ‘type’ attribute is placed in <ul>
opening tag.
Q.5) Table
Table is used to arrange data like text, images, links etc. into columns and
rows of cells.
Data is placed in the cells created using opening and closing tag of
data cell <td>.
Data cells are placed in opening and closing tag of<tr> element to
form a row of cells.
Rows are placed in opening and closing tag of <table> element to
form a table of rows and columns.
Data cells with <td> tag can be replaced with <th> tag in the first
row if the table contains column headers.
By default table borders are set to 0, i.e. borders are not shown to
the table.
To set table border ‘border’ attribute is used.
EXAMPLE
<body>
<table border=”1”>
<tr> <th>State</th> <th>Language</th> </tr>
<tr> <th>Goa</th> <th>Konkani</th> </tr>
<tr> <th>Karnataka</th> <th>Kannada</th> </tr>
<tr> <th>Maharashtra</th> <th>Marathi</th> </tr>
</table>
</body>
Q.6) Figure
The figure element is used to group together a piece of content, such as
an image, chart, graph, or text, and a caption marked off by figcaption tags. By
nesting the caption and the content between figure tags a relationship
between the nested elements is identified.
Q.7) Address
This attribute is used to associate contact information with the parent
element that contains the address element. For Example, when added to a
article, the address element provides contact information for the article author,
and when added to a web page footer the address identifies contact
information for the web page owner.
OTHER TAGS
Link tag - <base>
List tags - <dl>, <dt>, <dd>,
Table tags – tbody, thead, tfoot, col, colgroup and caption
Form tags – form, input, textarea, select, option, optgroup, button, label,
fieldset and legend.
Empty tag
Empty tags do n ot come in pair as they don’t have anything to
envelop. The examples of empty tags are <hr>, <br>, etc.
\
2. Block-level elements and Inline elements
Block-Level elements
Block-level element always starts on a new line and takes up the
full width available. It stretches out to the left and right as far as it
can by taking up the full width available. <p> element is the best
example of block-level element.
Inline Elements
Elements produced using inline markup tags does not start on a
new line unless it find room for itself to disdplay in the line. The
anchor (a) element is the most common inline element, since you
use them for links. An inline element can wrap some text inside a
paragraph without disrupting the flow of that paragraph.
<img> tag uses ‘src’. ‘alt’, ‘width’ etc.; <ol> tag uses ‘type’, ‘start’ etc.
<ol type= “1” start=1101>
<img src= “../images/kite.jpg” alt= “Flying kite Image 200px
%280px width”/>
a) The id attributes:
The id attributes is used to uniquely identify any element
within a page (or style sheet). There are two primary reasons
that you might want to use an id attribute on an element:
Id an element carries an id attribute as a unique
identifier, it is possible to identify just that element
and its content.
If you have two elements of the same name within a
Web page (or style sheet), you can use the id
attribute to distinquish between elements that have
the same name.
Internationalization Attributes
There are three internationalization attributes, which are available
to most (although not all) elements.
dir
lang
xml:lang
For Example:
<html dir=rtl>