Professional Documents
Culture Documents
INTRODUCTION
TO HTML
1. HTML - Introduction
2. HTML - Basic tags
5. HTML - Formatting
6. HTML - Phrase Tags
7. HTML - Comments
8. HTML - Fonts
9. HTML - Marquees
10. HTML - Images
Example:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
HTML HISTORY
Since the early days of the World Wide Web, there have been many versions of HTML:
YEAR VERSION
HEADING 1
HEADING 2
HEADING 3
HEADING 4
HEADING 5
HEADING 6
<hr > n/a This is a horizontal line. You can use width
and size attributes
<br /> n/a This tag allows you to insert line breaks
2) Which of the following element is responsible for making the text bold in HTML?
A) <pre>
B) <a>
C) <b>
D) <br>
3) Which of the following tag is used for inserting the largest heading in HTML?
A) <h3>
B) <h1>
C) <h5>
D) <h6>
4) Which of the following tag is used to insert a line-break in HTML?
A) <br>
B) <a>
C) <pre>
D) <b>
HTML lets you specify metadata - additional important information about a document in a variety of ways. The META
elements can be used to include name/value pairs describing properties of the HTML document, such as author, expiry date, a list
of keywords, document author etc.
The <meta> tag is used to provide such additional information. This tag is an empty element and so does not have a closing
tag but it carries information within its attributes.
A web document can include one or more meta tags depending on information, but in general, it doesn’t affect the physical
appearance of the document.
SYNTAX
<meta attribute-name="value">
You can add metadata to your web pages by placing <meta> tags inside the header of the document which is represented
by <head> and </head> tags. A meta tag can have following attributes in addition to core attributes.
SPECIFYNING KEYWORDS
You can use <meta> tag to specify important keywords related to the document and later these keywords are used by the
search engines while indexing your webpage for searching purpose.
Example:
<html>
<head>
<tiltle>Example</title>
</head>
<body>
</body>
</html>
Output:
DOCUMENT DESCRIPTION
You can use <meta> tag to give a short description about the document. This again can be used by various search engines
while indexing your webpage for searching purpose.
Example:
<html>
<head>
<h>DOCUMENT DESCRIPTION</h>
<meta name = "description" content = "learn about document description ." />
</head>
<body>
<p> various search engines while indexing your webpage for searching purpose.</p>
</body>
</html>
Output:
DOCUMENT DESCRIPTION
various search engines while indexing your webpage for searching purpose.
You can use <meta> tag to give information about when last time the document was updated. This information can be used
by various web browsers while refreshing your webpage.
Example:
<html>
<head>
<meta name = "keywords" content = "html ,Meta Tags, Revision Date" />
<meta name = "description" content = "Learning about Document Revision Date." />
</head>
<body>
<p>This information can be used by various web browsers while refreshing your webpage.</p>
</body>
</html>
Output:
DOCUMENT REFRESHING
A <meta> tag can be used to specify a duration after which your web page will keep refreshing automatically.
Example:
<html>
<head>
<h>Document Refreshing</h>
</head>
<body>
</body>
</html>
Output:
Document Refreshing
web page will keep refreshing automatically
PAGE REDIRECTION
You can use <meta> tag to redirect your page to any other webpage. You can also specify a duration if you want to redirect
the page after a certain number of seconds.
Example:
<html>
<head>
<title> Example</title>
<h>Page Redirection</h>
</head>
<body>
<p>redirect the page after a certain number of seconds.</p>
</body>
</html>
Output:
Page Redirection
redirect the page after a certain number of seconds.
SETTING COOKIES
Cookies are data, stored in small text files on your computer and it is exchanged between web browser and web server to
keep track of various information based on your web application need.
You can use <meta> tag to store cookies on client side and later this information can be used by the Web Server to track a
site visitor.
Example:
<html>
<head>
<title>example </title>
<h>SETTING COOKIES</h>
<meta http-equiv = "cookie" content = "userid = abc79; expires = Wednesday, 25-Aug-2021 13:12:59 GMT;" />
</head>
<body>
</body>
</html>
Output:
SETTING COOKIES
Information can be used by the Web Server to track a site visitor.
You can set an author name in a web page using meta tag.
Example:
<html>
<head>
<title>Example</title>
<h> Setting Author Name</h>
<meta name = "keywords" content = "html, Meta Tags, author" />
<meta name = "description" content = "Learning about Meta Tags author name." />
<meta name = "author" content = "Mahnaz Mohtashim" />
</head>
<body>
<p>set an author name in a web page</p>
</body>
</html>
Output:
You can use <meta> tag to specify character set used within the webpage.
Example:
<html>
<head>
<title> Example</title>
<meta name = "keywords" content = "HTML, Meta Tags, Specify Character Set" />
</head>
</html>
Output:
An attribute is used to define the characteristics of an HTML element and is placed inside the element's opening tag. All
attributes are made up of two parts − a name and a value
The name is the property you want to set. For example, the paragraph <p> element in the example carries an attribute whose
name is align, which you can use to indicate the alignment of paragraph on the page.
The value is what you want the value of the property to be set and always put within quotations. The below example shows
three possible values of align attribute: left, center and right.
Attribute names and attribute values are case-insensitive. However, the World Wide Web Consortium (W3C) recommends
lowercase attributes/attribute values in their HTML 4 recommendation.
Example:
<html>
<head>
<h>ALIGNMENT</h>
</head>
<body>
</body>
</html>
Output:
ALIGNMENT
left aligned
center aligned
right aligned
CORE ATTRIBUTES
The four core attributes that can be used on the majority of HTML elements (although not all) are −
1. Id
2. Title
3. Class
4. Style
1. THE id ATTRIBUTE
The id attribute of an HTML tag can be used to uniquely identify any element within an HTML page. There are two primary
reasons that you might want to use an id attribute on an element −
If 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 distinguish
between elements that have the same name.
Example:
<p id =” unique identifier" >it is possible to identify just that element and its content.
</p>
<p id = ”web page"> id attribute to distinguish between elements that have the same name.
</p>
The title attribute gives a suggested title for the element. They syntax for the title attribute is similar as explained
for id attribute −
The behavior of this attribute will depend upon the element that carries it, although it is often displayed as a tooltip when
cursor comes over the element or while the element is loading.
Example:
<html>
<head>
<title>The title Attribute Example</title>
</head>
<body>
<h1 title = "Title Attribute"> The title attribute gives a suggested title for the element </h1>
</body>
</html>
Output:
The class attribute is used to associate an element with a style sheet, and specifies the class of element. You will learn more
about the use of the class attribute when you will learn Cascading Style Sheet (CSS). So for now you can avoid it.
The value of the attribute may also be a space-separated list of class names.
Example:
class = "Cascading style sheet"
The style attribute allows you to specify Cascading Style Sheet (CSS) rules within the element.
Example:
<html>
<head>
<title>The style Attribute</title>
</head>
<body>
<p style = "font-family:arial; color:#FF0000;">The style Attribute.</p>
</body>
</html>
Output:
INTERNATIONALIZATION ATTRIBUTES
There are three internationalization attributes, which are available for most (although not all) XHTML elements.
1. dir
2. lang
3. xml:lang
The dir attribute allows you to indicate to the browser about the direction in which the text should flow. The dir attribute
can take one of two values,
VALUE DEFINITION
Example:
<head>
<title>Display Directions</title>
</head>
<body>
When used within another tag, it controls the text's direction for just the content of that tag. right-to-left directed text.
</body>
</html>
Output:
When used within another tag, it controls the text's direction for just the
content of that tag. right-to-left directed text.
The lang attribute allows you to indicate the main language used in a document, but this attribute was kept in HTML only
for backwards compatibility with earlier versions of HTML. This attribute has been replaced by the xml:lang attribute in new
XHTML documents.
The values of the lang attribute are ISO-639 standard two-character language codes.
Example:
<head>
<title>English Language Page</title>
</head>
<body>
The lang attribute
</body>
Output:
The xml:lang attribute is the XHTML replacement for the lang attribute. The value of the xml:lang attribute should be an
ISO-639 country code as mentioned in previous section.
Generic Attributes:
Valign top, middle, bottom Vertically aligns tags within an HTML element
Id User Defined Names an element for use with Cascading Style Sheets.
Class User Defined Classifies an element for use with Cascading Style
Sheets.
Width Numeric Value Specifies the height of tables, images, or table cells.
Hight Numeric Value Specifies the height of tables, images, or table cells.
a)<meta>tag
b)<title>tag
c)<html>tag
d)<head> tag
a)document description
b)document revision date
c)document refreshing
d)page redirection
3. Which tag is give information about when last time the document was uploaded?
5. <meta> tags to store………on clients side and later this information can be used b the web server to track a site visitor.
a)author name
b)character set
c)cookie
d)redirection
a)7
b)6
c)9
d)4
7. Which attributes is used to uniquely identify any element within an html page?
a)class
b)id
c)style
d)title
a)3
b)9
c)2
d)5
a)background color
b)valign
c)bgcolor
d)id
10. Which attribute is used to classifies an element for use with cascading style sheets?
a)clss
b)id
c)title
d)width
6 MARK QUESTION
12 MARK QUESTION
1. Explain briefly about <meta>tag with example. How <meta> tags are used in html?
5. HTML - FORMATTING
BOLD TEXT
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
ITALIC TEXT
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
UNDERLINED TEXT
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
STRIKE TEXT
The text that appears within <strike>...</strike>element,is displayed with strikethrough,which is a thin line through
the text.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
MONOSPACED FONT
The content of a <tt>...</tt> element is written in monospaced font.The fonts are known as variable-width fonts because
different letters are of different widths.In a monospaced font,each letter has the same width.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
SUPERSCRIPT TEXT
The content of a <sup>...</sup> element is written in superscript.The font size used is the same size as the character's
height above the other characters.
Example:
<html>
<head>
<body>
</body>
</html>
Output:
SUBSCRIPT TEXT
The content of a <sub>...</sub> element is written in subscript.The font size used is the same as the character surrounding
it,but display the half of the character.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
INSERTED TEXT
The text that appear within <ins>...</ins> element is displayed as inserted text.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
DELETED TEXT
Example:
<html>
<head>
<title>Example for deleted text</title>
</head>
<body>
</body>
</html>
Output:
LARGER TEXT
The text <big>...</big> element is displayed one font size larger than the rest of the text.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
SMALLER TEXT
The text of the <small>....</small> element is displayed one font size smaller than the rest of the text.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
GROUPING CONTENT
The <div> and <span> elements allow to group together several elements to create sections or subsections of a page.
Example:
<html>
<head>
<title>Example for div tag</title>
<style>
div{
color:red;
background color:white;
text align:center;
</style>
</head>
<body>
<h2>Beautiful quotes</h2>
</body>
</html>
Output:
Example:
<html>
<head>
</head>
<body>
<h2>Definition of birthday</h2>
</body>
</html>
Output:
6. HTML - PHRASE TAGS
EMPHASIZED TEXT
The text that appears within <em>...</em> elements is displayed as emphasized text.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
MARKED TEXT
The text that appears within <mark>...</mark> element,is displayed as marked in yellow ink.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
STRONG TEXT
The text that appears within <strong>...</strong> element is displayed as important text.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
TEXT ABBREVIATION
The text by putting it inside <abbr>....</abbr> .The title attribute must contain this full description and nothing else.
Example:
<html>
<head>
</head>
<body>
Language">HTML</abbr>.</p>
</body>
</html>
Output:
ACRONYM ELEMENT
Example:
<html>
<head>
</head>
<body>
WHO</acronym></p>
</body>
</html>
Output:
TEXT DIRECTION
The <bdo>...</bdo> element stands for Bi-Directional override and it is used to override the current text direction.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
SPECIAL TERMS
The <dfn>...</dfn> element allows to specify a special term.Its usage is similar to italic words in the midst of a paragraph.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
QUOTING TEXT
When we want to quote a passagefrom another source,that should be quoted between <blockquote>...</blockquote>.
Example:
<html>
<head>
</head>
<body>
<p>The following description of HTML </p>
</blockquotes>
</body>
</html>
Output:
SHORT QUOTATIONS
The <q>...</q> element is used when we want to add a double quote within a sentences.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
TEXT CITATIONS
If we quotes a text,that can indicate the source placing it between an opening <cite>....</cite>.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
COMPUTER CODE
Any programming code to appear on a web page should be placed inside <code>...</code>.The content of the <code>
element is presented in a monospaced font.
Example:
<html>
<head>
</head>
<body>
</p>
</body>
</html>
Output:
KEYBOARD TEXT
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
PROGRAMMING VARIABLES
This element is usually used in conjunction with the <pre> and <code> elements to indicate that the content of that
element is variable.
Example:
<html>
<head>
</head>
<body>
<p><code>password("<var>user-name</var>")</p>
</body>
</html>
Output:
PROGRAM OUTPUT
The <samp>...</samp> element indicates sample output from a program and script etc.Its mainly used when
documenting programming or coding concepts.
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
ADDRESS TEXT
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
MULTIPLE CHOICE QUESTIONS
a.<b>...</b>
b.<u>...</u>
c.<i>...</i>
d.<ul>...</ul>
a.<b>...</b>
b.<tt>...</tt>
c.<strike>...</strike>
d.<i>...</i>
3.By using superscript text <sup>...</sup> the result will be shown as?
a.<sub>...</sub>
b.<del>...</del>
c.<i>...</i>
d.<ins>...</ins>
a.important text
b.normal text
c.bold text
d.underline text
a.<div>...</div>
b.<abbr>...</abbr>
c.<acronym>...</acronym>
d.<em>...</em>
a.<kbd>...</kbd>
b.<pre>...</pre>
c.<code>...</code>
d.both b and c
6 MARK QUESTION
1.Explain about grouping content format and give a example in HTML program.
12 MARK QUESTION
Comments are some text or code written in your code to give an explanation about the code, and not visible to the user.
Comments which are used for HTML file are known as HTML comments. Anything written between these tags will be ignored by
the browser, so comments will not be visible on the webpage.
Comments of any code make code easy to understand and increase readability of code. Comments are also part of the code,
which gives an explanation of the code.
HTML comments are placed in between <!-- ... --> tags.
Example:
<!DOCTYPE html>
<html>
<head> <!-- Document Header Starts -->
<title>This is document title</title>
</head> <!-- Document Header Ends -->
<body>
<p>Hello HTML.....</p>
</body>
</html>
This will produce the following result without displaying the content given as a part of comments:
Output:
Hello HTML……..
Comments do not nest which means a comment cannot be put inside another comment. Second the double-dash
sequence "--" may not appear inside a comment except as part of the closing --> tag. You must also make sure that there are no
spaces in the start-of comment string.
Valid comment:
Example:
<html>
<head>
</head>
<body>
<!-- This is valid comment -->
<p>This is the valid comment.....</p>
</body>
</html>
Output:
Invalid comment:
Example:
<!DOCTYPE html>
<html>
<head>
<title>Invalid Comment Example</title>
</head>
<body>
< !-- This is not a valid comment -->
<p>Invalid comment...</p>
</body>
</html>
Output:
MULTILINE COMMENT
In HTML code, we can also comment multiple lines at a time. In multiline comment we can use any description about code
or multiple line code to debug, etc.
SYNTAX
<!---
Your code is commented.
Write description of code.
It will not display at webpage.
-->
Example:
<html>
<head>
<title>Example of HTML comment multiple lines of code</title>
</head>
<body>
<h1> HTML comment multiple lines of code </h1>
<!-- <h1> tag is a title of your page
and do not display <img border="2" src="nice_toen.jpg" alt="nice town">,
so this is a code of multilines comment -->
</body>
</html>
Output:
CONDITIONAL COMMENTS
Conditional comments only work in Internet Explorer (IE) on Windows but they are ignored
by other browsers.
Example:
<head>
<title>Conditional Comments</title>
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
</head>
<body>
<p>This is the content </p>
</body>
</html>
Output:
There are few browsers that support <comment> tag to comment a part of HTML code.
Example:
<head>
</head>
<body>
</body>
</html>
Output:
If you are using Java Script or VB Script in your HTML code then it is recommended to put that script code inside proper
HTML comments so that old browsers can work properly.
Example:
<html>
<head>
<title>Commenting Script Code</title>
<script>
<!--
document.write("Hello World!")
//-->
</script>
</head>
<body>
<p>Hello , World!</p>
</body>
</html>
Output:
If you are using Cascading Style Sheet (CSS) in your HTML code then it is recommended to put that style sheet code inside
proper HTML comments so that old browsers can work properly.
Example:
<html>
<head>
<style>
<!--
.example {
//-->
</style>
</head>
<body>
</body>
</html>
Output:
8. HTML - FONTS
Fonts play a very important role in making a website more user friendly and increasing content readability. Font face and
color depends entirely on the computer and browser that is being used to view your page but you can use HTML <font> tag to add
style, size, and color to the text on your website. You can use a <basefont> tag to set all of your text to the same size, face, and
color.
You can set content font size using size attribute. The range of accepted values is from 1(smallest) to 7(largest). The default
size of a font is 3.
Example:
<html>
<head>
<title>Setting Font Size</title>
</head>
<body>
<font size="1">Hello World</font><br />
<font size="2"> Hello World </font><br />
<font size="3"> Hello World </font><br />
<font size="4"> Hello World </font><br />
<font size="5"> Hello World </font><br />
<font size="6"> Hello World </font><br />
<font size="7"> Hello World </font>
</body>
</html>
Output:
You can set font face using face attribute but be aware that if the user viewing the page doesn't have the font installed, they
will not be able to see it. Instead user will see the default font face applicable to the user's computer.
Example:
<html>
<head>
<title>Font Face</title>
</head>
<body>
<font face="Times New Roman" size="4">Times New Roman</font><br />
<font face="Candara " size="4">Verdana</font><br />
<font face="High tower text " size="5">Comic Sans MS</font><br />
<font face="Georgia " size="4">WildWest</font><br />
<font face="Bedrock" size="4">Bedrock</font><br />
</body>
</html>
Output:
You can set any font color you like using color attribute. You can specify the color that you want by either the color name or
hexadecimal code for that color.
Example:
<html>
<head>
<title>Setting Font Color</title>
</head>
<body>
<font color="violet ">The text will be in violet</font><br />
<font color="Green"> The text will be in green</font>
</body>
</html>
Output:
You can specify how many sizes larger or how many sizes smaller than the preset font size should be. You can specify it
like <font size = "+n"> or <font size = "−n">
Example:
<html>
<head>
</head>
<body>
</body>
</html>
Output:
It is possible to specify two or more font face alternatives by listing the font face names, separated by a comma. If the user
doesn't have one Font installed in his system, the other can display the content.
Example:
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<font face="Times New Roman,Verdana,Comic sans MS,WildWest" size="5">Times New Roman</font><br />
</body>
</html>
Output:
The <basefont> element is supposed to set a default font size, color, and typeface for any parts of the document that are not
otherwise contained within a <font> tag. You can use the <font> elements to override the <basefont> settings.
Example:
<head>
<style>
body {
color: red;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Output:
a. comment
b. Table
c. Font
d. Form
2. __________only work in Internet Explorer (IE) on Windows but they are ignored
a. Conditional comments
b. Multiline comments
c. Single line comment
d. None of the above
a. comment tag
b. Font tag
c. Form tag
d. List tag
a. font
b. comment
c. Table
d. form
6. You can set any font color you like using _____ attribute.
a. face
b. size
c. color
d. none of the above
7. The ______element is supposed to set a default font size, color, and typeface
a. <basefont>
b. <font>
c. <list>
d. <form>
8. Which of the following is the correct way to change the font face in HTML?
a. <font name = "Calibri"> ……… </font>
b. <font face = "Calibri"> ……… </font>
c. <font = "Calibri"> ……… </font>
d. None of the above
6 MARK QUESTIONS
12 MARK QUESTIONS
1. What is HTML Font? How to set font size in HTML? Give an example.
2. What are the types of comment tag in HTML ? Explain with example.
9. HTML - MARQUEES
The marquee tag is a non-standard HTML element which causes text to scroll up, down, left or right automatically.
Marquee is one of the important tags introduced in HTML to support such scrollable texts and images within a web page.
The <marquee> tag is a container tag of HTML is implemented for creating scrollable text or images within a web page from
either left to right or vice versa, or top to bottom or vice versa.
ATTRIBUTE DESCRIPTION
behavior provides the scrolling type in a marquee. That scrolling can be like
sliding, scrolling or alternate
Loop provides how many times the marquee will loop
bgcolor provides a background color where the value will be either the name of
the color or the hexadecimal color-code.
vspace provides a vertical space and its value can be like: vspace="20" or
vspace="30%"
hspace provides a horizontal space and its value can be like: vspace="20" or
vspace="30%"
Example:
Scroll up:
<html>
<head>
<title>Example for HTML Marquee Tag</title>
</head>
<marquee width="40%" direction="up" height="30%">
This is sample scrolling text.
</marquee>
</html>
Output:
Example:
Scroll down:
Output:
Example:
Output:
Example:
Output:
SCROLLING SPEED
Marquee speed can be changed using the "scrollmount" attribute. For example, if you are using scrollmount = "1" then it sets the
marque to scroll very slowly, and as you increase the "scrollmount," the scrolling speed will also increase
Example:
Output:
10. HTML - IMAGES
• Images are not technically inserted into a web page; images are linked to web pages. The <img> tag creates a holding space
for the referenced image.
• The <img> tag is empty, it contains attributes only, and does not have a closing tag.
SYNTAX
<img src="url"
alt="alternatetext">
INSERT IMAGE
You can insert any image in your web page by using <img> tag.
SYNTAX
Example:
<!DOCTYPE html>
<html>
<body>
<h2>HTML Image</h2>
<img src="pic_trulli.jpg" alt="Trulli" width="500" height="333">
</body>
</html>
Output:
Usually we keep all the images in a separate directory. So let's keep HTML file test.htm in our home directory and create a
subdirectory images inside the home directory where we will keep our image test.png.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Using Image in Webpage</title>
</head>
<body>
<p>Simple Image Insert</p>
<img src = "/html/images/test.png" alt = "Test Image" />
</body>
</html>
• The required src attribute specifies the path (URL) to the image.
• When a web page loads; it is the browser, at that moment, that gets the image from a web server and inserts it into the page.
Therefore, make sure that the image actually stays in the same spot in relation to the web page, otherwise your visitors will get a
broken link icon. The broken link icon and the alt text are shown if the browser cannot find the image.
Example:
<!DOCTYPE html>
<html>
<body>
<h2>Alternative text</h2>
<p>The alt attribute should reflect the image content, so users who cannot see the image gets an understanding of what the image
contains:</p>
<img src="img_chania.jpg" alt="Flowers in Chania" width="460" height="345">
</body>
</html>
Output:
The required alt attribute provides an alternate text for an image, if the user for some reason cannot view it (because of slow
connection, an error in the src attribute, or if the user uses a screen reader).
You can use the style attribute to specify the width and height of an image.
Example:
<!DOCTYPE html>
<html>
<body>
<h2>Image Size</h2>
<p>Here we specify the width and height of an image with the width and height attributes:</p>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">
</body>
</html>
Output:
By default, image will have a border around it, you can specify border thickness in terms of pixels using border attribute. A
thickness of 0 means, no border around the picture.
Example:
<!DOCTYPE html>
<html>
<head>
<style>
img {
border: 5px solid #555;
}
</style>
</head>
<body>
<h2>Border Around Image</h2>
<p>Use the border property to add a border to an image:</p>
<img src="img_snow.jpg" alt="Snow" style="width:150px">
</body>
</html>
Output:
By default, image will align at the left side of the page, but you can use align attribute to set it in the center or right.
ATTRIBUTE VALUE EXPLANATION
Floats image
Example:
<p>
<img src="image/example.jpg" alt="Example" align="top">
Aligns to the top
<br>
The text aligns to the top of the image.
</p>
Output:
<p>
<img src="image/example.jpg" alt="Example" align="middle">
Aligns to the middle
<br>
The text aligns to the middle of the image.
</p>
Output:
Aligns to the bottom:
<p>
<img src="image/example.jpg" alt="Example" align="bottom">
Aligns to the bottom (Default)
<br>
The text aligns to the bottom of the image.
</p>
Output:
<p>
<img src="image/example.jpg" alt="Example" align="left">
Aligns to the left
<br>
The image floats to the left.
<br>
And the text wraps to the right of the image.
<br clear="left">
Clears the left
</p>
Output:
<p>
<img src="image/example.jpg" alt="Example" align="right">
Aligns to the right
<br>
The image floats to the right.
<br>
And the text wraps to the left of the image.
<br clear="right">
Clears the right
</p>
Output:
COMMON IMAGE FORMATS
The most common image file types, which are supported in all browsers (Chrome, Edge, Firefox, Safari, Opera):
TAG DESCRIPTION
3) A tag which is used for overriding the current text direction. e.g. Right to left side
5) Which of the following HTML tag is used to display the text with scrolling effect?
a.<marquee>
b.<scroll>
c.<div>
d.None of the above
a.<imp>
b.<img>
c.<image>
d.<src>
6 MARK QUESTION
12 MARK QUESTION
1. How will you scroll the text in HTML? Explain them briefly.
11. HTML - TEXT LINKS
Links are found in nearly all web pages. Links allow users to click their way from page to page.HTML links are hyperlinks.
You can click on a link and jump to another document.When you move the mouse over a link, the mouse arrow will turn into a
little hand.
SYNTAX
The most important attribute of the <a> element is the href attribute, which indicates the link's destination.The link text is the
part that will be visible to the reader.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
</body>
</html>
Output:
THE target ATTRIBUTE
The target attribute specifies where to open the linked document.
1 _blank
2 _self
3 _parent
4 _top
5 Targetframe
Example:
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
</html>
Output:
Example:
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
</body>
</html>
Output:
DOWNLOAD LINKS
You can create text link to make your PDF, or DOC or ZIP files downloadable. This is very simple; you just need to give
complete URL of the downloadable file as follows –
Example:
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
</body>
</html>
Output:
You can set colors of your links, active links and visited links using link, alink and vlink attributes of <body> tag.
Example:
Save the following in test.htm and open it in any web browser to see how link, alink and vlink attributes work.
Example:
<html>
<head>
<title>Hyperlink Example</title>
</head>
</body>
</html>
Output:
We can also create bookmark anchors to allow users to jump to a specific section of a web page. Bookmarks are especially
helpful if you have a very long web page.
Creating bookmarks is a two-step process: first add the id attribute on the element where you want to jump, then use
that id attribute value preceded by the hash sign (#) as the value of the href attribute of the <a> tag
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Creating Bookmarks in HTML</title>
<style>
h2 + p{
line-height: 75px;
}
</style>
</head>
<body>
<p><a href="#sectionA">Jump to Section A</a></p>
<p><a href="#sectionB">Jump to Section B</a></p>
<p><a href="#sectionC">Jump to Section C</a></p>
Output:
12. HTML - IMAGE LINKS
To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for
using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image.
With that, also add the height and width.
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</a>
</body>
</html>
Output:
Client-side image maps − This is created with the usemap attribute of the <img> tag, along with corresponding <map>
and <area> tags.
The <area> tag inside the map tag, specifies the shape and the coordinates to define the boundaries of each clickable hotspot
available on the image.
When ismap is used, the href attribute of the containing <a> tag must contain the URL of a server application like a cgi or
PHP script etc. to process the incoming request based on the passed coordinates.
The coordinates of the mouse position are screen pixels counted from the upper-left corner of the image, beginning with
(0,0). The coordinates, preceded by a question mark, are added to the end of the URL.
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</a>
</body>
</html>
Output:
MULTIPLE CHOICE QUESTIONS
1. Which one of the following value of target attribute opens the linked url in a new tab?
A. _self
B. _blank
C. _top
D. _parent
A.<link>
B. <hyperlink>
C. <a>
D. <title>
A. href
B. type
C. address
D. Link
5. What will the browser display for the above HTML code?
D. First it will display home.php, and upon clicking it, it will display Go to Home Page.(link)
6. By default, an unvisited link in HTML is-
A.inserting
B.deleting
C.displaying
D.none
A.<img href=”image.gif”>
B.<img> image.gif</gif>
6 MARK QUESTION
12 MARK QUESTION
It is not difficult to put an HTML email link on your webpage but it can cause unnecessary spamming problem for your
email account. There are people, who can run programs to harvest these types of emails and later use them for spamming in various
ways.
You can have another option to facilitate people to send you emails. One option could be to use HTML forms to collect user
data and then use PHP or CGI script to send an email.
A simple example, we take user feedback using this form and then we are using one CGI program which is collecting this
information and sending us email to the one given email ID.
This code will generate the following link which you can use to send email.
Now, if a user clicks this link, it launches one Email Client (like Lotus Notes, Outlook Express etc.) installed on your user's
computer. There is another risk to use this option to send email because if user do not have email client installed on their computers
then it would not be possible to send email.
DEFAULT SETTINGS
You can specify a default email subject and email body along with your email address.
Example:
<a href="mailto:bhuvna@gmail.com?subject=Hello&good morning=Message">
Send Hello
</a>
This code will generate the following link which you can use to send email.
STEP 3:
Type the users email next. A properly formatted command so-far would be <a
href=mailto:<nowiki> email@sample.com".
STEP 4:
Add a pre-made subject-line (optional). If you wish to add a pre-made subject, type a question mark (?) after the user's
email address, followed by the word "subject" (without the quotation marks), followed by an equals sign (=), followed by the
subject inside a pair of quotation marks.
If you want to add this to your command, it should look like this so far: <a
href=mailto:<nowiki>agentavery@sample.com?subject="subject text"
Try not to use characters that aren't alphanumeric in the subject line. There are ways to work around this so your link
doesn't get stumped and thinks it's part of something else".
While most often not used, it is possible to add information to prefill the subject line via the mailto syntax. However,
it's more often used when the mail is being sent to a server inside a robot that handles incoming mail so it can be
processed later (so it can be filtered).
You can add "body" as well as a cc or a bcc line using a similar syntax. Just make sure to use a question mark
followed by the term "body","cc", or "bcc" followed by an equals sign followed by the text for that line in a pair of
quotation marks.
STEP 5:
Type > to add a closing bracket. So far, our HTML commands tell the web browser what email address to link to,
and to add a subject/cc/bcc. The closing bracket ">" tells the web browser that there are no more commands to execute when the
link is clicked.
STEP 6:
Type link text. This is the text the user clicks on to open the email link. It goes after the closing bracket. This can be a
word, a phrase, or even a duplicate copy of the person's email address this is being sent to. Most often, this can be the phrase "here"
or "this" or something of that sort.
STEP 7:
1. Type </a> after the link text. This closes the HTML command. HTML anchor tags must have closure for this trick to work
and not make the remainder of the page become an extension of the anchor tag.
The entire HTML email link command should look something like this: <a
href=mailto:<nowiki>agentavery@sample.com?subject="HTML link">Click here to send
us an email!!!</a>
STEP 8:
Continue the remainder of the HTML document. Be sure to save your work. If you have more HTML to add to your
document, continue your work.
14. HTML - TABLES
A table is an arrangement of data in rows and columns, or possibly in a more complex structure. Tables are useful for various
tasks such as presenting text information and numerical data. ... Tables can be used to compare two or more items in tabular
form layout
Each table row is defined with a <tr> tag. Each table header is defined with a <th> tag. Each table data/cell is defined with
a <td> tag.
Example:
<!DOCTYPE html>
<html>
<style>
table, th, td {
</style>
<body>
<table style="width:100%">
<tr>
<th>NAME</th>
<th>CLASS</th>
<th>MARK</th>
</tr>
<tr>
<td>BHUVANSEHWARI</td>
<td>89</td>
</tr>
<tr>
<td>HEMA DEVI</td>
<td>B.Com CA</td>
<td>90</td>
</tr>
</table>
</body>
</html>
Output:
TABLE HEADING
HTML headings are titles or subtitles that you want to display on a webpage. HTML headings are defined with
the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading.
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table border="1">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>
<tr>
<td>BHUVANESHWARI</td>
<td>5000</td>
</tr>
<tr>
<td>HEMA DEVI</td>
<td>7000</td>
</tr>
</table>
</body>
</html>
Output:
CELLPADDING
Cellpadding specifies the space between the border of a table cell and its contents (i.e) it defines the whitespace between
the cell edge and the content of the cell.
SYNTAX
where, value determines the padding (space between the border of a table and its content)
CELL SPACING
Cell spacing specifies the space between cells (i.e) it defines the whitespace between the edges of the adjacent cells.
SYNTAX
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,
initial-scale=1.0">
<title>Document</title>
<style>
span{
text-decoration-style: solid;
width: 25px;
font-size: x-large;
color: blueviolet;
}
</style>
</head>
<body>
<table border="1"
cellpadding="4"
cell spacing="5">
<thead>
<td><span>Name</span></td>
<td><span>Age</span></td>
</thead>
<tbody>
<tr>
<td>BUNA</td>
<td>30</td>
</tr>
<tr>
<td>SAMU</td>
<td>35</td>
</tr>
<tr>
<td>HEMA</td>
<td>17</td>
</tr>
<tr>
<td>VARSHU</td>
<td>13</td>
</tr>
</tbody>
</table>
</body>
</html>
Output:
Attribute of
Both col span= and row span= are attributes of the two table-cell elements, <th> and <td>. They provide the same functionality
as “merge cell” in spreadsheet programs like Excel.
The value of either attribute must be a positive integer (a whole number). The value specifies the number of columns or rows
that the cell fills.
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table border="1">
<tr>
<th>NAME</th>
<th>MARK 1</th>
<th>MARK 2</th>
</tr>
<tr><td rowspan="2">BHUVANA</td><td>80</td><td>85</td></tr>
<tr><td>79</td><td>80</td></tr>
<tr><td colspan="3">TOTAL</td></tr>
</table>
</body>
</html>
Output:
TABLE BACKGROUND
In HTML, table background color is defined using Cascading Style Sheets (CSS). Specifically, you use the background-
color property to define background color. You can apply this property against the whole table, a row, or a single cell.
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<tr>
<th>NAME</th>
<th>MARK 1</th>
<th>MARK 2</th>
</tr>
<tr><td rowspan="2">BHUVANA</td><td>80</td><td>90</td></tr>
<tr><td>80</td><td>70</td></tr>
<tr><td colspan="3">TOTAL</td></tr>
</table>
</body>
</html>
Output:
HEIGHT
The HTML <td> height Attribute is used to specify the height of the table cell. If the <td> height attribute is not set
then it takes default height according to content.
SYNTAX
Attribute Values:
WIDTH
The HTML <td> width Attribute is used to specify the width of a table cell. If width attribute is not set then it takes
default width according to content.
SYNTAX
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<tr>
<td>NAME</td>
<td>CLASS</td>
</tr>
<tr>
<td>BHUVANESHWARI</td>
<td>B.Sc IT</td>
</tr>
</table>
</body>
</html>
Output:
TABLE CAPTION
The <caption> tag defines a table caption.The <caption> tag must be inserted immediately after the <table> tag.
By default, a table caption will be center-aligned above a table. However, the CSS properties text-align and caption-side can
be used to align and place the caption.
Example:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<caption>NO OF STUDENTS</caption>
<tr>
<td>1</td><td>BHUVANESHWARI</td>
</tr>
<tr>
<td>2</td><td>HEMA DEVI</td>
</tr>
<tr>
<td>3</td><td>VARSHINI</td>
</tr>
</table>
</body>
</html
Output:
FOOTER
The <tfoot> tag is used to group footer content in an HTML table.The <tfoot> element is used in conjunction with
the <thead> and <tbody> elements to specify each part of a table (footer, header, body).
Browsers can use these elements to enable scrolling of the table body independently of the header and footer. Also, when
printing a large table that spans multiple pages, these elements can enable the table header and footer to be printed at the top and
bottom of each page.
Note: The <tfoot> element must have one or more <tr> tags inside.
The <tfoot> tag must be used in the following context: As a child of a <table> element, after
any <caption>, <colgroup>, <thead>, and <tbody> elements. The <thead>, <tbody>, and <tfoot> elements will not affect the layout
of the table by default. However, you can use CSS to style these elements .
BODY
The <tbody> tag is used to group the body content in an HTML table.The <tbody> element is used in conjunction with
the <thead> and <tfoot> elements to specify each part of a table (body, header, footer).
Browsers can use these elements to enable scrolling of the table body independently of the header and footer. Also, when
printing a large table that spans multiple pages, these elements can enable the table header and footer to be printed at the top and
bottom of each page.
Note: The <tbody> element must have one or more <tr> tags inside.
The <tbody> tag must be used in the following context: As a child of a <table> element, after any <caption>, <colgroup>,
and <thead> elements. The <thead>, <tbody>, and <tfoot> elements will not affect the layout of the table by default. However, you
can use CSS to style these elements.
HEADER
The <header> element represents a container for introductory content or a set of navigational links.
Note: You can have several <header> elements in one HTML document. However, <header> cannot be placed within a <footer>,
<address> or another <header> element.
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<thead>
<tr>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4">TOTAL</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>BHUNA</td>
<td>HEMA</td>
<td>VARSHU</td>
<td>KAVYA</td>
</tr>
</tbody>
</table>
</body>
</html>
Output:
NESTED TABLE
The nested table in HTML means creating a table on a webpage inside another table on the same web page.
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<tr>
<td>
<tr>
<th>Name</th>
<th>TOTAL</th>
</tr>
<tr>
<td>BHUVANESHWARI</td>
<td>456</td>
</tr>
<tr>
<td>HEMA DEVI</td>
<td>478</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Output:
1.We can include default subject heading and body text by passing query parameter(s) separated by _____________ symbol.
A) Colon
B) Question Mark
C) Ampersand
D)Comma
2. In HTML, if we need to send the email then href attribute of anchor tag starts with a keyword:
A) email
B) mailto
C) none of these
D) mail
3. Symbol which is written immediately after mail to keyword in href attribute of anchor tag is:
A) Colon
B) semicolon
C) hash
D) comma
A) <th> tag
B) <tr> tag
C) <td> tag
D) <row> tag
5. In HTML tables gap between two cells of same tables are known as :
A) cell spacing
B) cell difference
C) cell pading
D) All of above
A) <th> tag
B) <tr> tag
C) <td> tag
D) <t head> tag
7.If you want to merge two or more rows in a tables which attributes you can use
A) Rowmerge
B) Rowspan
C)colmerge
D)colspan
A) <footer>
B) <sepfooter>
C) <tfoot>
D) None of them
6 MARK QUESTION
12 MARK QUESTION
HTML frames are used to divide your browser window into multiple sections where each section can load a separate HTML
document. A collection of frames in the browser window is known as a frameset. The window is divided into fraes in a similar way
the tables are organized: into rows and columns.
Disadvantages of Frames:
There are few drawbacks with using frames, so it's never recommended to use frames in your webpages:
1. Some smaller devices cannot cope with frames often because their screen is not big enough to be divided up.
2. Sometimes your page will be displayed differently on different computers due to different screen resolution.
3. The browser's back button might not work as the user hopes.
4. There are still few browsers that do not support frame technology.
CREATING FRAMES
To use frames on a page we use <frameset> tag instead of <body> tag. The <frameset> tag defines, how to divide the
window into frames. The rows attribute of <frameset> tag defines horizontal frames and cols attribute defines vertical frames. Each
frame is indicated by <frame> tag and it defines which HTML document shall open into the frame.
Example:
<!DOCTYPE html>
<html>
<frameset rows="25%,75%">
<frameset cols="25%,75%">
</frameset>
</html>
<html>
<head>
<title>first</title>
</head>
<body>
<center>
<h1>HARI STATIONARY</h1>
</center>
</body>
</html>
<html>
<head>
<title>second</title>
</head>
<body>
<h3>For Contact:</h3>
<p>9712347644
<br>
9497964326
</p>
</body>
</html>
<html>
<head>
<title>third</title>
</head>
<body>
<h2>WELCOME TO HARI STATIONARY</h2>
</body>
</html>
Output:
ATTRIBUTE DESCRIPTION
Cols Specifies how many columns are contained in the frameset and the size of each
column. You can specify the width of each column in one of the four ways: Absolute
values in pixels. For example, to create three vertical frames, use cols="100, 500,100".
A percentage of the browser window. For example, to create three vertical frames, use
cols="10%, 80%,10%". Using a wildcard symbol. For example, to create three vertical
frames, use cols="10%, *,10%". In this case wildcard takes remainder of the window.
As relative widths of the browser window. For example, to create three vertical
frames, use cols="3*,2*,1*". This is an alternative to percentages. You can use
relative widths of the browser window. Here the window is divided into sixths: the
first column takes up half of the window, the second takes one third, and the third
takes one sixth.
Rows This attribute works just like the cols attribute and takes the same values, but it is used
to specify the rows in the frameset. For example, to create two horizontal frames, use
rows="10%, 90%". You can specify the height of each row in the same way as
explained above for columns.
Border This attribute specifies the width of the border of each frame in pixels. For example,
border="5". A value of zero means no border.
ATTRIBUTE DESCRIPTION
src This attribute is used to give the file name that should be loaded in the frame. Its value
can be any URL. For example, src="/html/top_frame.htm" will load an HTML file
available in html directory.
name This attribute allows you to give a name to a frame. It is used to indicate which frame
a document should be loaded into. This is especially important when you want to
create links in one frame that load pages into an another frame, in which case the
second frame needs a name to identify itself as the target of the link.
frameborder This attribute specifies whether or not the borders of that frame are shown; it overrides
the value given in the frameborder attribute on the <frameset> tag if one is given, and
this can take values either 1 (yes) or 0 (no).
margininwidth This attribute allows you to specify the width of the space between the left and right of
the frame's borders and the frame's content. The value is given in pixels. For example
marginwidth="10".
marginheight This attribute allows you to specify the height of the space between the top and bottom
of the frame's borders and its contents. The value is given in pixels. For example
marginheight="10".
noresize By default, you can resize any frame by clicking and dragging on the borders of a
frame. The noresize attribute prevents a user from being able to resize the frame. For
example noresize="noresize".
scrolling This attribute controls the appearance of the scrollbars that appear on the frame. This
takes values either "yes", "no" or "auto". For example scrolling="no" means it should
not have scroll bars.
longdesc This attribute allows you to provide a link to another page containing a long
description of the contents of the frame. For example
longdesc="framedescription.htm"
If a user is using any old browser or any browser, which does not support frames then <no frames> element should be
displayed to the user. So you must place a <body> element inside the <no frames> element because the <frameset> element is
supposed to replace the <body> element, but if a browser does not understand <frameset> element then it should understand what
is inside the <body>element which is contained in a <noframes> element.
You can define an inline frame with HTML tag <iframe>. The <iframe> tag is not somehow related to <frameset> tag,
instead, it can appear anywhere in your document. The <iframe> tag defines a rectangular region within the document in which the
browser can display a separate document, including scrollbars and borders.
The src attribute is used to specify the URL of the document that occupies the inline frame.
Example:
<!DOCTYPE html>
<html>
<head>
<title> Iframes</title>
</head>
<body>
<p> Document content goes here… </p>
<iframe src = “/html /menu.htm” width = “555” height = “200”
Sorry your browser support inline frames.
<iframe>
<p> Document content also goes here.. </p>
</body>
</html>
Output:
Most of the attributes of the <iframe> tag, including name, class, frameborder, id, longdesc, marginheight, marginwidth,
name, scrolling, style, and title behave exactly like the corresponding attributes for the tag.
ATTRIBUTE DESCRIPTION
src This attribute is used to give the file name that should be loaded in the frame. Its value
can be any URL. For example, 16. HTML – IFRAMES HTML 87
src="/html/top_frame.htm" will load an HTML file available in html directory.
Name This attribute allows you to give a name to a frame. It is used to indicate which frame a
document should be loaded into. This is especially important when you want to create
links in one frame that load pages into an another frame, in which case the second
frame needs a name to identify itself as the target of the link.
Frameborder This attribute specifies whether or not the borders of that frame are shown; it overrides
the value given in the frameborder attribute on the <frame> tag if one is given, and this
can take values either 1 (yes) or 0 (no).
Marginwidth This attribute allows you to specify the width of the space between the left and right of
the frame's borders and the frame's content. The value is given in pixels. For example
marginwidth="10".
Margin height This attribute allows you to specify the height of the space between the top and bottom
of the frame's borders and its contents. The value is given in pixels. For example
marginheight="10".
Noresize By default, you can resize any frame by clicking and dragging on the borders of a
frame. The noresize attribute prevents a user from being able to resize the frame. For
example noresize="noresize".
Scrolling This attribute controls the appearance of the scrollbars that appear on the frame. This
takes values either "yes", "no" or "auto". For example scrolling="no" means it should
not have scroll bars.
longdesc This attribute allows you to provide a link to another page containing a long
description of the contents of the frame. For example
longdesc="framedescription.htm"
16. HTML - LISTS
HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements.
Lists may contain −
<ul> − An unordered list. This will list items using plain bullets.
<ol> − An ordered list. This will use different schemes of numbers to list your items.
<dl> − A definition list. This arranges your items in the same way as they are arranged in a dictionary.
An unordered list is a collection of related items that have no special order or sequence. This list is created by using
HTML <ul> tag. Each item in the list is marked with a bullet.
Example :
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Output :
Coffee
Tea
Milk
THE type ATTRIBUTE
You can use type attribute for <ul> tag to specify the type of bullet you like. By default, it is a disc. Following are the
possible options −
Example :
Disc:
<ul style="list-style-type:disc;">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Output :
Coffee
Tea
Milk
Circle:
<ul style="list-style-type:circle;">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Output:
o Coffee
o Tea
o Milk
Square :
<ul style="list-style-type:square;">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Output :
Coffee
Tea
Milk
You can use type attribute for <ol> tag to specify the type of numbering you like. By default, it is a number. Following are
the possible options −
Example:
Default-Case Numerals:
<ol type="1">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol
Output:
1. Coffee
2. Tea
3. Milk
Upper-Case Numerals:
<ol type="I">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Output :
I. Coffee
II. Tea
III. Milk
Lower-Case Numerals:
<ol type = “i">
<ol type="i">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Output:
i. Coffee
ii. Tea
iii. Milk
Upper-Case Letters:
<ol type="A">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Output:
A. Coffee
B. Tea
C. Milk
Lower-Case Letters:
<ol type="a">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol
<ol type = "I”>
Output:
a. Coffee
b. Tea
c. Milk
HTML and XHTML supports a list style which is called definition lists where entries are listed like in a dictionary or
encyclopedia. The definition list is the ideal way to present a glossary, list of terms, or other name/value list.
<dt> − A term
Example:
<dl>
<dt><b>HTML</b></dt>
<dd>This stands for Hyper Text Markup Language</dd>
<dt><b>HTTP</b></dt>
<dd>This stands for Hyper Text Transfer Protocol</dd>
</dl>
Output:
HTML
This stands for Hyper Text Markup Language
HTTP
This stands for Hyper Text Transfer Protocol
1 .which inline function embeds independent HTML document into current document?
A) <div>
B) <span>
C) <iframe>
D) <from >
2.Which frame following is not a type of screen frames on HTML?
A)Iframe
B) no frame
C) Frameset
D) Uframe
3.what is use of iframe in HTML?
A) <ul>tag
B) <li>tag
C) <lu>tag
D) None
A) LI
B) OL
C) UL
D) None of the above
A) Unorded list
B) Order list
C) Description list
D) Descriptive list
A) <dl>
B) <ol>
C) <ul>
D) <list>
6 MARK QUESTION
12 MARK QUESTION
1.What are the different types of List controls? Explain them briefly.
17. HTML - LAYOUTS
Following are different HTML5 elements which are used to define the different parts of a webpage.
HTML <header>
The <header> element is used to create header section of web pages. The header contains the introductory content, heading
element, logo or icon for the webpage, and authorship information.
Example:
<!DOCTYPE html>
<html>
<head>
<title>First Webpage</title>
</head>
<body>
<header style=”background-color: #303030; height: 80px;width: 100%”>
<h1 style=”font-size: 30px; color: white;text-align: center; padding-top: 15px;”>Welcome to MyWebpage</h1>
</header>
</body>
</html>
Output:
HTML <nav>
The <nav> elements is a container for the main block of navigation links. It can contain links for the same page or for other
pages.
Example:
<!DOCTYPE html>
<html>
<head>
<style>
li{ display: inline-block;
padding: 10px}
</style>
</head>
<body>
<nav style="background-color:#bcdeef;">
<h1 style="text-align: center;">Navgation Links</h1>
<ul>
<li><a href="#">link1</a></li>
<li><a href="#">link2</a></li>
<li><a href="#">link3</a></li>
<li><a href="#">link4</a></li>
</ul>
</nav>
</body>
</html>
Output:
HTML <section>
HTML <section> elements represent a separate section of a web page which contains related element grouped together. It
can contain: text, images, tables, videos, etc.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Page Section</title>
</head>
<body>
<section style=”background-color:#ff7f50; width: 100%; border: 1px solid black;”>
<h2>Introduction to JAVA</h2>
<p>Java is one of the most popular programming languages out there. Released in 1995 and still widely used today, Java has
many applications, including software development, mobile applications, and large systems development. Knowing Java opens a
lot of possibilities for you as a developer.</p>
</section>
</body>
</html>
Output:
HTML <article>
Tag is used to contain a self-contained article such as big story, huge article, etc.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Article Example</title>
</head>
<body>
<article style=”width: 100%; border:2px solid black; background-color: #fff0f5;”>
<h2>History of Computer</h2>
<p>Write your content here for the history of computer</p>
</article>
</body>
</html>
Output:
HTML <aside>
HTML <aside> define aside content related to primary content. The <aside> content must be related to the primary content.
It can function as side bar for the main content of web page.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Aside Example</title>
</head>
<body>
<aside style=”background-color:#e6e6fa”>
<h2>Sidebar information</h2>
<p>This conatins information which will represent like a side bar for a webpage</p>
</aside>
</body>
</html>
Output:
HTML <footer>
HTML <footer> element defines the footer for that document or web page. It mostly contains information about author,
copyright, other links, etc.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Footer Section</title>
</head>
<body>
<footer style=”background-color:#f0f8ff; width: 100%; text-align: center;”>
<h3>Footer Example</h3>
<p>© Copyright 2018-2020. </p>
</footer>
</body>
</html>
Output:
HTML <details>
HTML <details> element is used to add extra details about the web page and use can hide or show the details as per
requirement.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Details element</title>
</head>
<body>
<details style=”background-color: #f5deb3”>
<summary>This is visible section: click to show other details</summary>
<p>This section only shows if user want to see it. </p>
</details>
</body>
</html>
Output:
HTML <summary>
HTML <summary> element is used with the <details> element in a web page. It is used as summary, captions about the
content of <details> element.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Summary Example</title>
</head>
<body>
<details>
<summary>HTML is acronym for?</summary>
<p style=”color: blue; font-size: 20px;”>Hypertext Markup Language</p>
</details>
</body>
</html>
Output:
18. HTML - COLORS
COLOR NAMES
Tomato
Orange
DodgerBlue
MediumSeaGreen
Gray
SlateBlue
Violet
LightGray
BACKGROUND COLOR
Example:
<!DOCTYPE html>
<html>
<body>
<p style=”background-color:grey;”>
English mathematician Charles Babbage conceives of a steam-driven calculating machine that would be able to compute tables of
numbers. The project, funded by the English government, is a failure. More than a century later, however, the world’s first
computer was actually built
</p>
</body>
</html>
TEXT COLOR
Example:
<!DOCTYPE html>
<html>
<body><!D<!DOCTYPEOCTYPE html>
<html>
<body>
<p style="color:DodgerBlue;">: In France, Joseph Marie Jacquard invents a loom that uses punched
wooden cards to automatically weave fabric designs. Early computers would use similar punch card</p>
<p style="color:MediumSeaGreen;">Herman Hollerith designs a punch card system to calculate the 1880
census, accomplishing the task in just three years and
saving the government $5 million. He establishes a company that would ultimately become IBM..</p>
</body>
</html>
Output:
COLOR VALUES
In HTML, colors can also be specified using RGB values, HEX values, HSL values, RGBA values, and HSLA values.
The following three <div> elements have their background color set with RGB, HEX, and HSL values:
Example:
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Output:
BORDER COLOR
Example:
<!DOCTYPE html>
<html>
<body>
<p>In addition to the predefined color names, colors can be specified using RGB, HEX, HSL, or even transparent colors using
RGBA or HSLA color values.</p>
</body>
</html>
Output:
a) <footer>
b) <header>
c) <head>
d) <body>
a) <nav>
b) <address>
c) <footer>
d) <header>
a) <nav>
b) <header>
c) <footer>
d) <article>
a) <aside>
b) <footer>
c) <section>
d) <div>
5) What is the HTML code for adding a background color?
6) Which amongst the following tags is used to specify important texts in HTML?
a)<b>
b)<important>
c)<imptext>
d)<strong>
7) In HTML, each parameter in RGB(red, green, blue) defines intensity of color between?
a)0 – 90
b)0 – 255
c)0-65536
d)0 – infinity
a) Values
b)HEX Values
c) Codes
d) A and B
6 MARK QUESTION
12 MARK QUESTION
HTML Forms are required, when you want to collect some data from the site visitor. For example,
during user registration you would like to collect information such as name, email address, credit
card, etc.
A form will take input from the site visitor and then will post it to a back-end application such as
CGI, ASP Script or PHP script etc. The back-end application will perform required processing on
the passed data based on defined business logic inside the application.
There are various form elements available like text fields, textarea fields, drop-down menus, radio
buttons, checkboxes, etc.
The HTML <form> tag is used to create an HTML form and it has following syntax:
FORM ATTRIBUTES
There are different types of form controls that you can use to collect data using HTML form:
This control is used for items that require only one line of user input, such as search boxes or names. They are created using
HTML <input> tag.
Example:
<form >
First name: <input type="text" name="first_name" />
<br>
Last name: <input type="text" name="last_name" />
</form>
Output:
ATTRIBUTES
Following is the list of attributes for <input> tag for creating text field.
● type - Indicates the type of input control and for text input control it will be set to text.
● name - Used to give a name to the control which is sent to the server to be recognized and get the value.
● value - This can be used to provide an initial value inside the control.
● size - Allows to specify the width of the text-input control in terms of characters.
● maxlength - Allows to specify the maximum number of characters a user can enter into the text box.
This is also a single-line text input but it masks the character as soon as a user enters it. They are also created using HTML
<input> tag but type attribute is set to password.
Example:
<form >
User ID : <input type="text" name="user_id" />
<br>
Password: <input type="password" name="password" />
</form>
Output:
ATTRIBUTES
Following is the list of attributes for <input> tag for creating password field.
● type - Indicates the type of input control and for password input control it will be set to password.
● name - Used to give a name to the control which is sent to the server to be recognized and get the value.
● value - This can be used to provide an initial value inside the control.
● size - Allows to specify the width of the text-input control in terms of characters.
maxlength - Allows to specify the maximum number of characters a user can enter into the text box.
This is used when the user is required to give details that may be longer than a single sentence. Multi-line input controls are
created using HTML <textarea> tag.
Example:
<form>
Description: <br />
<textarea rows="5" cols="50" name="description">
Enter description here...
</textarea>
</form>
Output:
ATTRIBUTES
● name - Used to give a name to the control which is sent to the server to be recognized and get the value.
● rows - Indicates the number of rows of text area box.
● cols - Indicates the number of columns of text area box
2. CHECKBOX CONTROL
Checkboxes are used when more than one option is required to be selected. They are also created using HTML <input> tag
but type attribute is set to checkbox.
Example:
<form>
<input type="checkbox" name="red" value="on"> Red
<input type="checkbox" name="blue" value="on"> Blue
</form>
Output:
ATTRIBUTES
● type - Indicates the type of input control and for checkbox input control it will be set to checkbox.
● name - Used to give a name to the control which is sent to the server to be recognized and get the value.
● value - The value that will be used if the checkbox is selected.
● checked - Set to checked if you want to select it by default.
Radio buttons are used when out of many options, just one option is required to be selected. They are also created using
HTML <input> tag but type attribute is set to radio.
Example:
<form>
<input type="radio" name="color" value="red"> Red
<input type="radio" name="color" value="blue"> Blue
</form>
Output:
ATTRIBUTES
● type - Indicates the type of input control and for checkbox input control it will be set to radio.
● name - Used to give a name to the control which is sent to the server to be recognized and get the value.
● value - The value that will be used if the radio box is selected.
● checked - Set to checked if you want to select it by default.
A select box, also called drop down box which provides option to list down various options in the form of drop down list,
from where a user can select one or more options.
Example:
<form>
<select name="dropdown">
<option value="School">School</option>
<option value="College” selected</option>
</select>
</form>
Output:
ATTRIBUTES
● name - Used to give a name to the control which is sent to the server to be recognized and get the value.
● size - This can be used to present a scrolling list box.
● multiple - If set to "multiple" then allows a user to select multiple items from the menu.
● value - The value that will be used if an option in the select box box is selected.
● selected - Specifies that this option should be the initially selected value when the page loads.
● label - An alternative way of labeling options
If you want to allow a user to upload a file to your web site, you will need to use a file upload box, also known as a file
select box. This is also created using the <input> element but type attribute is set to file.
Example:
<form>
<input type="file" name="fileupload" accept="image/*" />
</form>
Output:
ATTRIBUTES
6. BUTTON CONTROLS
There are various ways in HTML to create clickable buttons. You can also create a clickable button using <input> tag by
setting its type attribute to button.
Example:
<form>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
<input type="button" name="ok" value="OK" />
<input type="image" name="imagebutton" src="/html/images/logo.png" />
</form>
Output:
Hidden form controls are used to hide data inside the page which later on can be pushed to the server. This control hides
inside the code and does not appear on the actual page. For example, following hidden form is being used to keep current page
number. When a user will click next page then the value of hidden control will be sent to the web server and there it will decide
which page will be displayed next based on the passed current page.
Example:
<form>
<p>This is page 10</p>
<input type="hidden" name="pagename" value="10" />
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
Output:
20. HTML - BACKGROUNDS
HTML provides the following two ways to decorate webpage background.They are:
● Html Background with Colors
● Html Background with Images
The bgcolor attribute is used to control the background of an HTML element, specifically page body and table backgrounds.
SYNTAX
<tagname bgcolor=”color_value”…>
Example:
<body style="background-color:powderblue;">
<h1>HTML background color </h1>
<p>This is a skyblue .</p>
</body>
Output:
The background attribute can also be used to control the background of an HTML element, specifically page body and table
backgrounds. You can specify an image to set background of your HTML page or table.
SYNTAX
Example:
<style>
body {
background-image: url('img_girl.jpg');
}
</style>
</head>
<body>
<h2>Background Image</h2>
</body>
Output:
This simply can be achieved by using patterned image or transparent image in the background. It is suggested that while
creating patterns or transparent GIF or PNG images, use the smallest dimensions possible even as small as 1x1 to avoid slow
loading.
Example:
Output:
a) two
b) three
c)four
d) five
2. Which control is used for items that require only one line of user input, such as search boxes or names?
4. ______ are used when more than one option is required to be selected.
a)Radiobuttons
b)Checkboxes
c)Selectbox
d)File upload box
5. ____ control hides inside the code and does not appear on the actual page.
a)Button Controls
b)Radio button controls
c) Checkbox Controls
d)Hidden Form Controls
a)two
b)three
c)four
d)five
a)text
b)bgcolor
c)background
d)link
8. _____ attribute is used to set color at the page body and table background.
a)bgcolor
b)background
c)text
d)link
6 MARK QUESTION
1. How to set background color in HTML? Give an example using HTML code.
12 MARK QUESTION
1. What are the different types of form controls? Explain them briefly.
21. HTML - EMBED MULTIMEDIA
The easiest way to add video or sound to your web site is to include the special HTML tag called <embed>.This tag causes
the browser itself to include controls for the multimedia automatically provided browser supports <embed> tag and given media
type.You can also include a <noembed> tag for the browsers which don't recognize the <embed> tag.
1 align
Determines how to align the object. It can be set to either center, left or right.
2 autostart
This boolean attribute indicates if the media should start automatically. You can set it
either true or false.
3 loop
Specifies if the sound should be played continuously (set loop to true), a certain
number of times (a positive value) or not at all (false)
4 playcount
Specifies the number of times to play the sound. This is alternate option for loop if you
are usiong IE.
5 hidden
Specifies if the multimedia object should be shown on the page. A false value means
no and true values means yes.
6 width
Width of the object in pixels
7 height
Height of the object in pixels
8 name
A name used to reference the object.
9 src
URL of the object to be embedded.
10 volume
Controls volume of the sound. Can be from 0 (off) to 100 (full volume).
Example:
<html>
<body>
<title>Embeded PDF</title>
<embed type = "application/pdf" src = "PL SQL.pdf" width=100% height=700px>
</embed>
</body>
</html>
Output:
BACKGROUND AUDIO
You can use HTML <bgsound> tag to play a soundtrack in the background of your webpage. This tag is supported by
Internet Explorer only and most of the other browsers ignore this tag. It downloads and plays an audio file when the host document
is first downloaded by the user and displayed. The background sound file also will replay whenever the user refreshes the
browser.This tag is having only two attributes loop and src.
This will produce the blank screen. This tag does not display any component and remains hidden.Internet Explorer can also
handle only three different sound format files − wav, the native format for PCs; au, the native format for most Unix workstations;
and MIDI, a universal music-encoding scheme.
Example:
<html>
<head>
<title>HTML audio controls</title>
</head>
<body>
<bgsound src = "levitating.mid">
</bgsound>
Internet Explorer support this audio element.
</body>
</html>
Output:
levitating.mid
MULTIMEDIA FORMATS
Multimedia elements (like audio or video) are stored in media files.The most common way to discover the type of a file, is to
look at the file extension.Multimedia files have formats and different extensions like: .wav, .mp3, .mp4, .mpg, .wmv, and .avi.
HTML AUDIO
The HTML <audio> element is used to play an audio file on a web page.
The controls attribute adds audio controls, like play, pause, and volume.
The <source> element allows you to specify alternative audio files which the browser may choose from. The browser will
use the first recognized format.
The text between the <audio> and </audio> tags will only be displayed in browsers that do not support the <audio> element.
MP3 is the best format for compressed recorded music. The term MP3 has become synonymous with digital music.If your
website is about recorded music, MP3 is the choice.
MIDI .mid MIDI (Musical Instrument Digital Interface). Main format for all electronic
.midi music devices like synthesizers and PC sound cards. MIDI files do not
contain sound, but digital notes that can be played by electronics. Plays
well on all computers and music hardware, but not in web browsers.
RealAudio .rm RealAudio. Developed by Real Media to allow streaming of audio with
.ram low bandwidths. Does not play in web browsers.
WMA .wma WMA (Windows Media Audio). Developed by Microsoft. Plays well on
Windows computers, but not in web browsers.
AAC .aac AAC (Advanced Audio Coding). Developed by Apple as the default format
for iTunes. Plays well on Apple computers, but not in web browsers.
WAV .wav WAV. Developed by IBM and Microsoft. Plays well on Windows,
Macintosh, and Linux operating systems. Supported by HTML.
Ogg .ogg Ogg. Developed by the Xiph.Org Foundation. Supported by HTML.
MP3 .mp3 MP3 files are actually the sound part of MPEG files. MP3 is the most
popular format for music players. Combines good compression (small
files) with high quality. Supported by all browsers.
NOTE: Only MP3,WAV and Ogg audio are supported by the HTML Standard.
Chromium browsers do not allow autoplay in most cases. However, muted autoplay is always allowed.
<html>
<title>HTML audio controls</title>
<body>
<audio controls>
<source src = “Levitating.mp3” type = “audio/mpeg”>
Your browser does not support this audio element.
</audio>
</body>
</html>
Output:
Levitating.mp3
<html>
<title>HTML audio muted</title>
<body>
<audio muted controls>
<source src = “Alone.wav” type = “audio/wav”>
Your browser does not support this audio element.
</audio>
</body>
</html>
Output:
Alone.wav
<html>
<title>HTML audio controls</title>
<body>
<audio controls>
<source src = “Child’s Nightmare.ogg” type = “audio/ogg”>
Your browser does not support this audio element.
</audio>
</body>
</html>
Output:
Child's
Nightmare.ogg
HTML VIDEO
The controls attribute adds video controls, like play, pause, and volume.
We can also include width and height attributes. If height and width are not set, the page might flicker while the video loads.
The <source> element allows you to specify alternative video files which the browser may choose from. The browser will
use the first recognized format.
The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.
COMMON VIDEO FORMATS
There are many video formats out there.The MP4, WebM, and Ogg formats are supported by HTML.
The MP4 format is recommended by YouTube.
MPEG .mpg MPEG. Developed by the Moving Pictures Expert Group. The first popular
.mpeg video format on the web. Not supported anymore in HTML.
AVI .avi AVI (Audio Video Interleave). Developed by Microsoft. Commonly used
in video cameras and TV hardware. Plays well on Windows computers, but
not in web browsers.
WMV .wmv WMV (Windows Media Video). Developed by Microsoft. Commonly used
in video cameras and TV hardware. Plays well on Windows computers, but
not in web browsers.
QuickTime .mov QuickTime. Developed by Apple. Commonly used in video cameras and
TV hardware. Plays well on Apple computers, but not in web browsers.
RealVideo .rm RealVideo. Developed by Real Media to allow video streaming with low
.ram bandwidths. Does not play in web browsers.
WebM .webm WebM. Developed by Mozilla, Opera, Adobe, and Google. Supported by
HTML.
MPEG-4 .mp4 MP4. Developed by the Moving Pictures Expert Group. Commonly used in
or MP4 video cameras and TV hardware. Supported by all browsers
and recommended by YouTube.
NOTE: Only MP4, WebM and Ogg video are supported by the HTML Standard.
Chromium browsers do not allow autoplay in most cases. However, muted autoplay is always allowed.
<html>
<title>HTML video controls</title>
<body>
<video width = “500” height = “340” controls>
<source src = “Oggy.mp4” type = “audio/mp4”>
Your browser does not support this video element.
</video>
</body>
</html>
Output:
Oggy.mp4
<html>
<title>HTML video muted</title>
<body>
<video width = “400” height = “220” muted controls>
<source src = “Oggy.mp4” type = “audio/mp4”>
Your browser does not support this video element.
</video>
</body>
</html>
Output:
Oggy.mp4
The <object> element defines an embedded object within an HTML document. It was designed to embed plug-ins (like Java
applets, PDF readers, and Flash Players) in web pages, but can also be used to include HTML in HTML.The <object> element is
supported by all browsers.
Example:
<html>
<body>
</body>
</html>
Output:
Example:
<html>
<body>
<object data="Ed.jpg"></object>
</body>
</html>
Output:
22. HTML - STYLES
Cascading Style Sheets (CSS) provide easy and effective alternatives to specify various attributes for the HTML tags. Using
CSS, you can specify a number of style properties for a given HTML element. Each property has a name and a value, separated by
a colon (:). Each property declaration is separated by a semi-colon (;).
Setting the style of an HTML element, can be done with the style attribute.
SYNTAX
<tagname style="property:value;">
Example:
<html>
<head>
<title>HTML Styles</title>
</head>
<body>
<p style = "color:red; font-size:30px;" >Documents are presented on screen</p>
</body>
</html>
Output:
If you need to use your style sheet to various pages, then its always recommended to define a common style sheet in a
separate file. A cascading style sheet file will have extension as .css and it will be included in HTML files using <link> tag.
Example:
CSS RULES
body
{background-color:teal;}
h1
{color: black;margin-left: 20px;}
We defined two CSS rules which will be applicable to two different classes defined for the HTML tags.
Now we can use the above external CSS file in our following HTML document.
HTML CODE
<html>
<head>
<title>HTML External styles</title>
<link rel = "stylesheet" type = "text/css" href = "sty.css">
</head>
<body>
<h1>Let it snow</h1>
<h4>Let it rain</h4>
</body>
</html>
Output:
If you want to apply Style Sheet rules to a single document only, then you can include those rules in header section of the
HTML document using <style> tag.Rules defined in internal style sheet overrides the rules defined in an external CSS file.
Example:
<html>
<head>
<title>HTML Internal styles</title>
<style>
body
{background-color:tomato;}
h2
{color: black;margin-left: 30px;}
</style>
</head>
<body>
<h2>Let it snow</h2>
<p>Let it rain<p>
</body>
</html>
Output:
An inline style may be used to apply a unique style for a single element.To use inline styles, add the style attribute to the
relevant element. The style attribute can contain any CSS property.
Example:
<html>
<body>
</body>
</html>
Output:
MULTIPLE CHOICE QUESTIONS
1. Which tag will be used incase of <embed> tag when it was not supported by browser?
a)<object>
b) <noembed>
c) <audio>
d) <applet>
a) playcount
b) hidden
c) loop
d) align
a) loop
b) classid
c) autostart
d) hidden
a) .mov
b) .wmv
c) .mpeg
d) .swf
a) class
b) line/url or path
c) page
d) none
7. Which attribute is used to add video controls like play, pause, and volume in video?
a) <autoplay>
b) <play>
c) <video controls>
d) <controls>
a) cascading
b) cellpadding
c) cellspacing
d) style
6 MARK QUESTION
12 MARK QUESTION