Web Development Lab: Rajat Goyal 1 14IT056
Web Development Lab: Rajat Goyal 1 14IT056
Experiment: - 1
Aim: - To study about basic terms used on Web.
World Wide Web (WWW): - August 6 is celebrated as the day when the 'Web' was
born. On August 6, 1991, Tim Berners-Lee published a report of 'World Wide Web' (WWW)
and made internet available to the public. WWW took technology to a different direction and
connected people in a way which was beyond imagination.
World Wide Web Consortium (W3C): - Stands for "World Wide Web
Consortium." The W3C is an international community that includes a full-time staff, industry
experts, and several member organizations. These groups work together to develop standards
for the World Wide Web.
The mission of the W3C is to lead the Web to its full potential by developing
relevant protocols and guidelines. This is achieved primarily by creating and publishing Web
standards. By adopting the Web standards created by the W3C, hardware manufacturers
and software developers can ensure their equipment and programs work with the latest Web
technologies. For example, most Web browsers incorporate several W3C standards, which
allows them to interpret the latest versions of HTML and CSS code. When browsers conform
to the W3C standards, it also helps Web pages appear consistent across different browsers.
Besides HTML and CSS standards, the W3C also provides standards for Web graphics (such
as PNG images), as well as audio and video on the Web. The organization also develops
HTML
XML
standards for Web applications, Web scripting, and dynamic content. Additionally, the W3C
provides privacy and security guidelines that websites should follow.
The World Wide Web Consortium has played a major role in the development of the Web
since it was founded in 1994. As Web technologies continue to evolve, the W3C continues to
publish new standards. For example, many of the technologies included in Web 2.0 websites
are based on standards developed by the W3C. To learn more about the W3C and the current
standards published by the organization, visit the W3C website.
The original language of the World Wide Web is HTML (HyperText Markup Language),
often referred to by its current version, HTML 4.01 or just HTML4 for short. HTML was
originally an application of SGML (Standard Generalized Markup Language), a sort of meta-
language for making markup languages. SGML is quite complicated, and in practice most
browsers do not actually follow all of its oddities. HTML as actually used on the web is best
described as a custom language influenced by SGML.
Another important thing to note about HTML is that all HTML user agents (this is a catchall
term for programs that read HTML, including web browsers, search engine web crawlers,
and so forth) have extremely lenient error handling. Many technically illegal constructs, like
misnested tags or bad attribute names, are allowed or safely ignored. This error-handling is
relatively consistent between browsers. But there are lots of differences in edge cases,
because this error handling behavior is not documented or part of any standard. This is why it
is a good idea to validate your documents.
XML and XHTML are quite different. XML (eXtensible Markup Language) grew out of a
desire to be able to use more than just the fixed vocabulary of HTML on the web. It is a
meta-markup language, like SGML, but one that simplifies many aspects to make it easier to
make a generic parser. XHTML (eXtensible HyperText Markup Language) is a reformulation
of HTML in XML syntax. While very similar in many respects, it has a few key differences.
First, XML always needs close tags, and has a special syntax for tags that don’t need a close
tag. In HTML, some tags, such as img are always assumed to be empty and close themselves.
Others, like p may close implicitly based on other content. And others, like div always need
to have a close tag. In XML (including XHTML), any tag can be made self-closing by
putting a slash before the code angle bracket, for example <img src="funfun.jpg"/>. In
HTML that would just be <img src="funfun.jpg">
Second, XML has draconian error-handling rules. In contrast to the leniency of HTML
parsers, XML parsers are required to fail catastrophically if they encounter even the simplest
syntax error in an XML document. This gives you better odds of generating valid XML, but
it also makes it very easy for a trivial error to completely break your document.
HTML-compatible XHTML
When XML and XHTML were first standardized, no browser supported them natively. To
enable at least partial use of XHTML, the W3C came up with something called “HTML-
compatible XHTML”. This is a set of guidelines for making valid XHTML documents that
can still more or less be processed as HTML. The basic idea is to use self-closing syntax for
tags where HTML doesn’t want a close tag, like img, br or link, with an extra space before
the slash. So our ever-popular image example would look like this: <img src="funfun.jpg" />.
The details are described in the Appendix C of the XHTML 1.0 standard.
It’s important to note that this is kind of a hack, and depends on the de facto error handling
behavior of HTML parsers. They don’t really understand the XML self-closing syntax, but
writing things this way makes them treat / as an attribute, and then discard it because it’s not
a legal attribute name. And if you tried to do something like <div />, they wouldn’t
understand that the div is supposed to be empty.
There are also many other subtle differences between HTML and XHTML that aren’t
covered by this simple syntax hack. In XHTML, tag names are case sensitive, scripts behave
in subtly different ways, and missing implicit elements like <tbody> aren’t generated
automatically by the parser.
So if you take an XHTML document written in this style and process it as HTML, you aren’t
really getting XHTML at all – and trying to treat it as XHTML later may result in all sorts of
breakage.
In fact, the vast majority of supposedly XHTML documents on the internet are served
as text/html. Which means they are not XHTML at all, but actually invalid HTML that’s
getting by on the error handling of HTML parsers. All those “Valid XHTML 1.0!” links on
the web are really saying “Invalid HTML 4.01!”.
Experiment: - 2
Program: -
<html>
<head>
<title> Web Development Experment 2 </title>
</head>
<body>
<center><table border="2" cellpadding="10">
<tr>
<td colspan="4" bgcolor="red"><center>Sandeep goyal</center></td>
</tr>
<tr>
<td bgcolor="yellow">1</td>
<td colspan="2" rowspan="2" bgcolor="red"><img src="wd1.jpg"
height="100" width="100"></td>
<td bgcolor="yellow">3</td>
</tr>
<tr>
<td bgcolor="yellow">1</td>
<td bgcolor="yellow">3</td>
</tr>
<tr>
<td colspan="2" bgcolor="yellow"><center>4</center></td>
<td colspan="2" bgcolor="yellow"><center>5</center></td>
</tr>
<tr>
<td bgcolor="red">6</td>
<td bgcolor="red"><center>7</center></td>
<td bgcolor="red"><center>8</center></td>
<td bgcolor="red"><center>9</center></td>
</tr>
</table></center>
</body>
</html>
Experiment: - 3
Program: -
<html>
<head>
</head>
<body>
</tr>
<tr>
<td bgcolor="yellow">3</td>
<td rowspan="2" bgcolor="yellow">3</td>
<td bgcolor="yellow"><img src="wd1.jpg" height="100"
width="100"></td>
</tr>
<tr>
<td bgcolor="red">4</td>
<td bgcolor="red"><center>4</center></td>
</tr>
</table></center>
</body>
</html>
Experiment: - 4
only tells users what is on your page, but also entices them to visit your site. A
description is what shows up here in the search engine results. It is like good
window dressing. Sites with poor descriptions will get less click throughs and the
search engines will demote your site in favor of other sites.
“Description” helps with site rankings: The common belief (based on what Google
said in 2009) is that nothing in the description will help you get rankings.
However, I have seen evidence to the contrary. Is it heavily weighted? No, but if
you want some value on a secondary keyword (say an –ing –ed or –s), use it here.
Two other quick notes on meta description tags:
Empty Descriptions: Can a description be empty? Yes. When it is empty Google
and Bing will fill it in for you. In fact, sometimes (e.g., for blogs) you may prefer
Google’s or Bing’s version. (Personally though, I always fill it in whenever
possible, preferring my version to theirs, but if you have a small staff, this isn’t
always practical.)
Quotes: Don’t use full quotation marks (“”) in your description. It will likely cut
off your description. Use single quotes to avoid this issue.
The Keywords Meta Tag
A long time ago in a galaxy far, far away, the “keywords” meta tag was a critical element for
early search engines. Much like the dinosaurs, this tag is a fossil from ancient search engine
times.
The only search engine that looks at the keywords anymore is Microsoft’s Bing – and they
use it to help detect spam. To avoid hurting your site, your best option is to never add this
tag.
Or, if that’s too radical for you to stomach, at least make sure you haven’t stuffed 300
keywords in the hopes of higher search rankings. It won’t work. Sorry.
If you already have keyword meta tags on your website, but they aren’t spammy, there’s no
reason to spend the next week hurriedly taking them out. It’s OK to leave them for now – just
take them out as you’re able, to reduce page weight and load times.
Experiment: - 5
Program: -
Index.html
<html>
<head>
<frameset cols="50%,50%">
<frame src="abc.html">
<frame name="1" src="aa.html">
</frameset>
</head>
</html>
Abc.html
<html>
<body>
<center>
<a href="aa.html" target="1"><h3>Page AA</h3></a><br><br>
<a href="bb.html" target="1"><h3>Page BB</h3></a><br><br>
<a href="cc.html" target="1"><h3>Page CC</h3></a><br><br>
<a href="dd.html" target="1"><h3>Page DD</h3></a><br><br>
</center>
</body>
</html>
aa.html
<html>
<body>
</body>
</html>
BB.html
<html>
<body>
</body>
</html>
CC.html
<html>
<body>
</body>
</html>
DD.html
<html>
<body>
</body>
</html>