Que Bank With Solution
Que Bank With Solution
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta charset="UTF-8">
</head>
<body>
<h1>Main Heading</h1>
<p>This is a paragraph of text.</p>
</body>
</html>
<!DOCTYPE html> Declares the document type and version (HTML5 here).
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<p> tag
The <p> tag in HTML stands for "paragraph" — it's used to define a block of text as a
paragraph.
Ex: <p>This is a paragraph of text.</p>
It automatically adds some space (margin) before and after the paragraph. It wraps the text
neatly and makes your content more readable. It requires a closing tag, like this: </p>.
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<hr> tag:
The <hr> tag in HTML stands for "horizontal rule", and it's used to insert a horizontal line across
the page.
It’s mainly used to separate sections of content.
It’s an empty tag — no closing tag needed (like <br>).
Visually, it shows a thin line that helps break up your page and make it easier to read.
Basic example:
<p>This is the first section.</p>
<hr>
<p>This is the next section.</p>
This would show two paragraphs with a horizontal line between them.
<!DOCTYPE>
Declares the document type and version of HTML/XHTML.
<!DOCTYPE html>
It helps browsers render the page correctly.
<html>
The root element that wraps all other elements.
<html lang="en">
</html>
In XHTML, it must be closed properly (</html>), and attributes should be in lowercase.
<head>
Contains meta-information about the document (like title, styles, scripts).
<head>
<title>My Page</title>
<meta charset="UTF-8">
</head>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<body>
Contains all the visible content of the web page.
<body>
<h1>Welcome to My Website</h1>
<p>This is a paragraph.</p>
</body>
In XHTML, all tags inside the body must be properly closed.
Heading Elements (<h1> to <h6>)
Define headings, with <h1> being the largest and <h6> the smallest.
<h1>Main Heading</h1>
<h2>Subheading</h2>
Helps organize content hierarchically
<p> (Paragraph)
Represents a paragraph of text.
<p>This is a paragraph of text.</p>
Automatically adds space before and after the paragraph.
4. What do you mean by Document Type Definition (DTD). Write the basic
structure specification for document type statements.
A DTD indicates the syntax that can be used for the various elements of a language such as
HTML.
The < DOCTYPE> statement, which indicates the particular version of HTML or
XHTML being used in the document.
The DTDs define the allowed syntax for documents written in that version of (X)HTML.
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<strong>T e s t o f s p a c e s</strong><br>
As shown here, all the spaces, tabs, and returns are collapsed to a single
element: However, it is possible to force the whitespace issue.
If more spaces are required, it is possible to use the nonbreaking space entity, or
Further note that in some situations, (X)HTML does treat whitespace characters
differently.In the case of the pre-element, which defines a preformatted block of text,
white space is preserved rather than ignored because the content is considered
preformatted.
It is also possible to use the CSS property white-space to change default whitespace
handling
(X)HTML Follows a Content Model
All forms of markup support a content model that specifies that certain elements are
supposed to occur only within other elements.
For example, markup like this <ul> <p>What a simple way to break the content model!</p>
</ul>
Elements Should Have Close Tags Unless Empty
Under traditional HTML, some elements have optional close tags. For example, both of the
paragraphs here are allowed, although the second one is better:
<p>This isn't closed
<p>This is</p>
A few elements, like the horizontal rule (hr) and line break (br), do not have close tags
becausethey do not enclose any content. These are considered empty elements and can be
used as is in traditional HTML. However, under XHTML you must always close tags, so
you would have to write <br></br> or, more commonly, use a self-closing tag format with a
final “/” character, like so: <br />.
6.Why few HTML4 Elements Removed from HTML5? Give the Removed HTML
Elements list and also CSS alternatives.
A few elements are removed from the HTML5 specification simply because they are archaic,
misunderstood, have usability concerns, or have a function that is equivalent to the function of
other elements.
Table summarizes some of the elements that have been removed from the HTML5 specification.
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
7.Write the snippet of code to demonstrate the following semantic inline elements
a. Indicating Dates and Time (ii) Inserting Figures
Code snippet to indicate Date and time
<p><label>datetime-local:
<input type="datetime-local" name="datetime2">
</label></p>
<p><label>time:
<input type="time" name="time">
</label></p>
<p>
<figure style="display: inline-block; margin: 0;">
<img src="mascot.png" alt="Company Mascot" width="100">
<figcaption style="font-size: small; text-align: center;">Our beloved
mascot!</figcaption>
</figure>
</p>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<dl>
<dt>Coffee</dt>
<dd>A brewed drink made from roasted coffee beans.</dd>
</dl>
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language, used to structure web pages.</dd>
</dl>
<menu>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</menu>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTML5 video example</title>
</head>
<body>
<h1>Simple Video Examples</h1>
<video src="video.mp4" width="640" height="360" controls>
<strong>HTML5 video element not supported</strong>
</video>
<br><br><br>
<video width="640" height="360" controls poster="loading.png">
<source src="a.mp4 " type="video/mp4">
<source src="b.mp4 " type="video/ogg">
<strong>HTML5 video element not supported</strong>
</video>
</body>
</html>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
Example:
Here’s a simple HTML5 structure showing semantic elements:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Semantic HTML5 Example</title>
</head>
<body>
<header>
<h1>Welcome to My Blog</h1>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Articles</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>
<main>
<article>
<header>
<h2>HTML5 Semantic Elements</h2>
<p><time datetime="2025-04-26">April 26, 2025</time></p>
</header>
<section>
<p>Semantic elements make the structure of web pages clearer and easier to
maintain.</p>
</section>
<figure>
<img src="semantic-example.png" alt="HTML5 Semantics" width="400">
<figcaption>Illustration of semantic tags in HTML5</figcaption>
</figure>
</article>
<aside>
<h3>Related Links</h3>
<p>Check out more on <a href="#">HTML5 best practices</a>.</p>
</aside>
</main>
<footer>
<p>© 2025 My Blog. All rights reserved.</p>
</footer>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
</body>
</html>
11.Implement a code snippet to show the usage of section header and footer tags in HTML5
document structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Section, Header, and Footer Example</title>
</head>
<body>
<header>
<h1>My Awesome Website</h1>
<p>Welcome to my site all about tech and tutorials!</p>
</header>
<section>
<header>
<h2>About Me</h2>
</header>
<p>Hi, I'm Alex, a web developer passionate about building beautiful and functional
websites.</p>
<footer>
<p>Written by Alex - Updated on <time datetime="2025-04-26">April 26,
2025</time></p>
</footer>
</section>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
Command Element
The menu element may contain not just links but also other interactive items, including the
newly introduced command element.
This empty element takes a label and may have an icon decoration as well.
Slightly different from meter is the progress element, which defines completion progress for
some task.
<p>Progress: <progress id="progressBar" max="100.00" value="33.1"> 33.1%</progress></p>
13.Create the following table using XHTML tags. Properly align cells, give suitable cell
Padding and cell spacing, and apply background color, bold and emphasis necessary.
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<td padding:15px>
<em>Subject A</em>
</td>
</tr>
<tr>
<td><em>Subject B</em></td>
</tr>
<tr>
<td><em>Subject C</em></td>
</tr>
<tr>
<td rowspan="3" align="center" bgcolor=red>
<b>Sem2</b>
</td>
<td><em>Subject E</em></td>
</tr>
<tr>
<td><em>Subject F</em></td>
</tr>
<tr>
<td><em>Subject G</em></td>
</tr>
<tr>
<td rowspan="3" align="center" bgcolor=purple>
<b>Sem3</b>
</td>
<td><em>Subject H</em></td>
</tr>
<tr>
<td><em>Subject I</em></td>
</tr>
<tr>
<td><em>Subject J</em></td>
</tr>
</table>
</body>
</html>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Semantic Tags Demo</title>
<style>
body
{
background-color: yellow;
}
aside
{
float: right;
width: 25%;
background-color: cyan;
font-style: italic;
padding: 15px;
}
main
{
float: left;
width: 70%;
}
footer
{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
}
mark
{
background-color: yellow;
color: black;
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
figure
{
display: inline-block;
margin: auto;
}
figcaption
{
font-style: italic;
}
</style>
</head>
<body>
<article>
<header>
<h1>My Travelogue</h1>
<p>Random Escapades</p>
</header>
<main>
<figure>
<img src="journey.jpg" alt="Example Image" width="350" height="235">
<figcaption>The road never ends</figcaption>
</figure>
<section>
<h2>Ooty</h2>
<p>Ooty is a popular hill station located in the Nilgiri Hills. It is popularly called the
"Queen of Hill Stations".</p>
</section>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<section>
<h2>Mysore</h2>
<p> The city is also known as the City of Palaces, Mysuru has always enchanted its
visitors
with its quaint charm.</p>
</section>
</main>
<aside>
<section>
<p>Upcoming Trek planned to <mark>Kumara Parvata</mark> will be sharing detils
soon</p>
<details>
<summary>Tentative Dates</summary>
<p>24th January 2023</p>
</details>
</section>
</aside>
<footer>
<p>© 2023 Prabodh C P</p>
</footer>
</article>
</body>
</html>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ordered List Example</title>
</head>
<body>
<h2>ORDERED LIST</h2>
<p>Ingredients for making coffee</p>
<ol>
<li>Sugar</li>
<li>Coffee</li>
<li>Milk</li>
</ol>
</body>
</html>
16.Use HTML 5 for performing following tasks: Draw a square using HTML5 SVG , fill
the square with green color and make 6px brown stroke width.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
17.With an example, describe any 3 important tags which can be embedded inside <head>
tag.
<head>
Contains meta-information about the document (like title, styles, scripts).
<head>
<title>My Page</title>
<meta charset="UTF-8">
</head>
Put a background image to a page and demonstrate all attributes of background image
Create unordered list of 5 fruits and ordered list of 3 flowers
<head>
<title>SAMPLE XHTML PAGE</title>
<meta name="author" content="Putta" />
<meta name="date" content="2023-02-17T04:15:01+0530" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<style>
Body
{
background-image: url("image.jpg");
background-position: right bottom;
background-repeat:no-repeat;
background-attachment: fixed;
}
</style>
</head>
<body>
<h4>Paragraph</h4>
<p>
<b><i>All that glitters is not gold</i></b> is an aphorism stating that not everything that
looks precious or true turns out to be so. While early expressions of the idea are known from
at least the 12th-13th century, the current saying is derived from a 16th-century line by
William Shakespeare,
<b><i>All that glisters is not gold</i></b>.
<br /><br />
<b><i>All that glisters is not gold</i></b><br />
Often have you heard that told.<br />
Many a man his life hath sold<br />
But my outside to behold.<br />
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
<h4>Equation</h4>
<i>x</i> = 1/3(<i>y</i><sub>1</sub><sup>2</sup> +
<i>z</i><sub>1</sub><sup>2</sup>)
<h4>Unordered Fruit List</h4>
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Apples</li>
</ul>
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
</ol>
</body>
</html>
19.Describe how the <canvas> tag is used to create client-side graphics in web applications
The <canvas> tag is used to draw graphics on the web page, right inside the browser, on the
client side. You can use it to draw: Shapes (like rectangles, circles),Lines, Text, Images, Even
create animations, graphs, games, and visual effects
Basic Structure:
<canvas id="myCanvas" width="400" height="300" style="border:1px solid #000000;">
Your browser does not support the HTML5 canvas tag.
</canvas>
id = give it a name to reference it with JavaScript.
width and height = size of the drawing area (in pixels).
style = optional CSS styling (like borders).
We can draw any shapes on canvas using java script which is shown below:
<script>
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
// Draw a blue rectangle
ctx.fillStyle = "blue";
ctx.fillRect(50, 50, 200, 100); // (x, y, width, height)
</script>
The above snippet when placed in html script draws a blue rectangle
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555
Department of Information Science and Engineering
Acharya Institute of Technology
Affiliated to VTU, Recognized by GOK and Approved by AICTE, New Delhi (Accredited by NAA
Radhakrishnan Road, Acharya P.O., Soladevanahalli, Bangalore-560107, INDIA
www.acharya.ac.in, Email: [email protected]
Logical and Physical Markup Physical markup refers to using a markup language such
as (X)HTML to make pages look a particular way; logical markup refers to using
(X)HTML to specify the structure or meaning of content while using another
technology, such as CSS, to designate the look of the page.
Physical markup is obvious; if you want to highlight something that is important to
the reader, you might embolden it by enclosing it within a <b> tag: <b>This is
important! </b>
Logical markup is a little less obvious; to indicate the importance of the phrase, it
should be enclosed in the logical strong element: <strong>This is important. </strong>
Remember, the <strong> tag is used to say that something is important content, not to
indicate how it looks.
If a CSS rule were defined to say that important items should be big, red, and italic
<style="text/css">
strong {font-size: xx-large; color: red; font-style: italic;}
</style>
Confusion would not necessarily ensue, because we shouldn’t have a predisposed view of
what strong means visually.
HTML unfortunately mixes logical and physical markup thinking.
Even worse, common renderings are so familiar to developers that tags that are logical are
assumed physical. The benefits of logical elements might not be obvious to those
comfortable with physical markup. To understand the benefits, it’s important to realize that on
the Web, many browsers render things differently. Whether you subscribe to the physical
(specific) or logical (general) viewpoint, traditional HTML is neither purely physical nor purely
logical.
Acharya Dr. Sarvepalli Radhakrishnan Road, Soladevanahalli, Acharya P. O., Bangalore-560 107
https://ait.ac.in Ph.: 080 22555555