collegefile
collegefile
collegefile
ROLL_ NO – 2201330109009
SECTION – CSE-C
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<h1>Hello, Duniya</h1>
</body>
</html>
Output –
Qn 2. Implementing HTML program that represents a document.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<title>College File</title>
</head>
<body>
</body>
</html>
Output –
<!DOCTYPE html>
<html lang="en">
<head>
<title>Resume</title>
</head>
<body>
<style>
.name{
text-align: center;
</style>
<body>
<h1>Amit Kumar</h1>
<p>Web Developer</p>
</div>
<h2>About Me</h2>
<p>I am a passionate web developer with a strong foundation in HTML, CSS, and
JavaScript</p>
<h2>Experience</h2>
<p>Fresher</p>
<h2 >Education</h2>
<li>Web Developer</li>
<li>Software Developer</li>
<h2>Contact</h2>
</body>
</html>
Output –
Qn4. Creating html document that represents document object
model.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="container">
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</div>
<script>
</script>
</body>
</html>
Output –
Qn-5. To Create a table to show your class time table.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Class Timetable</title>
</head>
<body>
<h1>College Timetable</h1>
<th>Day/Time</th>
<th>9.0-10.0</th>
<th>10.0-11.0</th>
<th>11.0-12.0</th>
<th>12.0-1.0</th>
<th colspan="5">1.0-2.0</th>
<th>2.0-3.0</th>
<th>3.0-4.0</th>
<th>4.0-5.0</th>
</tr>
<th>Monday</th>
<td>DT</td>
<td>Elective-1</td>
<td colspan="5">Lunch</td>
<td>Elective-2</td>
<td>COI</td>
<td>DBMS</td>
</tr>
<th>Tuesday</th>
<td>CD</td>
<td>DBMS</td>
<td>COI</td>
<td>WT</td>
<td colspan="5">Lunch</td>
<td>Elective-1</td>
<td>Elective-2</td>
<td>DT</td>
</tr>
<th>Wednwsday</th>
<td>InternShip</td>
<td>Inetrnship</td>
<td>DT</td>
<td>DBMS</td>
<td colspan="5">Lunch</td>
<td>CD</td>
<td>DT</td>
<td>CD</td>
</tr>
<th>Tharusday</th>
<td>DBMS(LAB)</td>
<td>DBMS(LAB)</td>
<td>Comptative Coding</td>
<td>Comptative Coding</td>
<td colspan="5">Lunch</td>
<td>InternShip</td>
<td>CD(LAB)</td>
<td>CD(LAB)</td>
</tr>
<th>Friday</th>
<td>DBMS</td>
<td>MOOCS</td>
<td>COI</td>
<td>MOOCS</td>
<td colspan="5">Lunch</td>
<td>CD</td>
<td>WT</td>
<td>DBMS</td>
</tr>
</table>
Output-
Qn-6. Implementing HTML program that for Heading .
Program –
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Heading Example</title>
</head>
<body>
</body>
</html>
Output-
Qn-7 Implementing program that implement paragraph and line-break.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<p>This is a paragraph. It can contain <br>line breaks to break the content into multiple
lines.</p>
</body>
</html>
Output-
Qn-8 Use tables to provide layout to your HTML page describing your college
infrastructure.
Program –
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>College Infrastructure</title>
</head>
<body>
<th >Building</th>
<th>Floors</th>
<th>Rooms</th>
<th>Facilities</th>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</body>
Output-
Qn-9 Use <span> and <div> tags to provide a layout to the above page instead
of a table layout.
Program –
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>College Infrastructure</title>
<style>
.building {
margin-bottom: 20px;
.floor {
font-weight: bold;
.facilities {
margin-left: 20px;
</style>
</head>
<body>
<h1>College Infrastructure</h1>
<div class="building">
<div class="facilities">
Classrooms, Labs, Auditorium
</div>
</div>
<div class="building">
<div class="facilities">
</div>
</div>
<div class="building">
<div class="facilities">
</div>
</div>
</body>
</html>
Output-
Qn-10 Apply various colors to suitably distinguish keywords , also apply font
styling like italics, underline and two other fonts to words you find
appropriate , also use header tags.
Program –
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Styled Keywords</title>
<style>
.keyword {
font-weight: bold;
color: blue;
font-style: italic;
text-decoration: underline;
</style>
</head>
<body>
<p>In HTML, the <span class="keyword">header</span> tag is used for defining headings. It is
an example of a keyword.</p>
<p>The <span class="keyword">div</span> tag is a container that can be used to group other
HTML elements together.</p>
<p>You can style HTML elements using <span class="keyword">CSS</span> to enhance the
appearance of your web page.</p>
</body>
</html>
Output-
Qn-11Create a webpage with HTML describing your department use
paragraph and list tags.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Department Information</title>
</head>
<body>
<p>Welcome to the Department of Computer Science at XYZ University. Our department offers a
wide range of courses
<h2>Our Programs</h2>
<ul>
</ul>
<h2>Facilities</h2>
<ul>
</ul>
</body>
</html>
Output-
Qn-12Create links on the words e.g. ―Wi-Fi and ―LAN to link them to
Wikipedia pages
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Links Example</title>
</head>
<body>
<h1>Internet Technologies</h1>
</body>
</html>
Output-
Qn-13 Insert an image and create a link such that clicking on image takes user
to other page.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Image Link</title>
</head>
<body>
<a href="https://www.example.com">
</a>
</body>
</html>
Output-
Qn-14 Change the background color of the page; At the bottom create a link
to take user to the top of the page.
Program –
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Styled Page</title>
<style>
body {
background-color: lightgray;
.top-link {
position: fixed;
bottom: 20px;
right: 20px;
</style>
</head>
<body>
<h1>Welcome to My Page</h1>
<a id="top"></a>
</body>
</html>
Output-
Qn-15Use frames such that page is divided into 3 frames 20% on left to show
contents of pages, 60% in center to show body of page, remaining on right to
show remarks.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Frames Example</title>
</head>
</frameset>
</html>
Output-
Qn-16 Design a HTML registration form that takes user name, user password
and mobile number with submit button control.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
</head>
<body>
<h1>User Registration</h1>
<label for="username">Username:</label>
<label for="password">Password:</label>
</form>
</body>
</html>
Output-
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<label for="date">Date:</label>
<label for="number">Number:</label>
<label for="range">Range:</label>
<label for="email">Email:</label>
<label for="search">Search:</label>
<datalist id="fruits">
<option value="Apple">
<option value="Banana">
<option value="Orange">
<option value="Mango">
<option value="Grapes">
</datalist>
</body>
</html>
Output-
Qn-18 Implementation in HTML5 that include native audio and video support
without the need for Flash.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<body>
<h2>Audio</h2>
<audio controls>
</audio>
<h2>Video</h2>
</video>
</body>
</html>
Output-
Qn-19 Creating HTML program to implement three articles with independent,
self-contained content.
Program-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Articles</h1>
<article>
<p>HTML, which stands for HyperText Markup Language, is the standard markup language
used to create web pages.
It provides the basic structure of a website by defining different elements such as headings,
paragraphs,
</article>
<article>
<p>Cascading Style Sheets (CSS) is a stylesheet language used for describing the look and
formatting of a
document written in HTML. With CSS, you can control the layout, colors, fonts, and spacing
of your web
</article>
<article>
dynamic user experiences. With JavaScript, you can add functionalities like form validation,
animations,
and asynchronous data loading to your websites, enhancing their interactivity and
responsiveness.</p>
</article>
</body>
</html>
Output-
Qn-20 Creating a XML document that defines the self-descriptive tags.
Program-
<?xml version = "1.0"?>
<contact-info>
<name>Prince Singh</name>
<company>GOOGLE</company>
<phone>01123344444</phone>
</contact-info>
Output -
Qn-21.Designing XML document that store various book data such as: book
category, title, author, year and price.
Program-
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="cooking">
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
Output-
Qn. 22 To Describe the various types of XML key components.
Program-
<?xml version="1.0" encoding="UTF-8" ?>
<website>
<company category="COSFINIX">
<title>Machine learning</title>
<author>Prince </author>
<year>2022</year>
</company>
<company category="COSFINIX">
<title>Web Development</title>
<author>Prince </author>
<year>2020</year>
</company>
<company category="COSFINIXe">
<title>XML</title>
<author>Prakash </author>
<year>2009</year>
</company>
</website>
Output-
Qn. 23 Design XML DTD to define the structure and legal element and
attribute of XML document.
Program-
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE website [
]>
<website>
<company category="COSFINIX">
<title>Machine learning</title>
<author>Prince </author>
<year>2022</year>
</company>
<company category="COSFINIX">
<title>Web Development</title>
<author>Prince </author>
<year>2020</year>
</company>
<company category="COSFINIXe">
<title>XML</title>
<author>Prakash </author>
<year>2009</year>
</company>
</website>
Output-
<!DOCTYPE bookstore [
]>
<bookstore>
<book category="children">
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
Output-
Qn. 25 Design a XML Schema that describes the structure of an XML document.
Program-
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs:schema>
Output-
Qn-26 Design a XML document that describe the well-formed XML document.
Program-
</document>
Qn-27 Design a XML document of CD Catalog through
each <CD> element, and displays the values of the
<ARTIST> and the <TITLE> elements in an HTML table.
Program-
</CD>
<CD>
<ARTIST>Artist 3</ARTIST>
<TITLE>Title 3</TITLE>
</CD>
</CD_CATALOG>
<!DOCTYPE html>
<html>
<head>
<title>CD Catalog</title>
</head>
<body>
<h1>CD Catalog</h1>
<table border="1">
<tr>
<th>Artist</th>
<th>Title</th>
</tr>
<!-- Use XSLT to transform XML into HTML table -->
<?xml-stylesheet type="text/xsl" href="27_1.xsl"?>
<tr>
<td>Artist 1</td>
<td>Title 1</td>
</tr>
<tr>
<td>Artist 2</td>
<td>Title 2</td>
</tr>
<tr>
<td>Artist 3</td>
<td>Title 3</td>
</tr>
</table>
</body>
</html>