0% found this document useful (0 votes)
22 views9 pages

Sudhanshu Tripathi Web Technology

The document provides code for a web page that displays information about a department or school. The HTML code includes sections for the page header, navigation menu, and content sections for latest news, about, programs, faculty, and contact information. The CSS code styles the various page elements like the header, navigation menu, content sections, and footer. The JavaScript code declares an XMLHttpRequest object but does not include any event handling code.

Uploaded by

newb53223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

Sudhanshu Tripathi Web Technology

The document provides code for a web page that displays information about a department or school. The HTML code includes sections for the page header, navigation menu, and content sections for latest news, about, programs, faculty, and contact information. The CSS code styles the various page elements like the header, navigation menu, content sections, and footer. The JavaScript code declares an XMLHttpRequest object but does not include any event handling code.

Uploaded by

newb53223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Queston1 .

Design a web page for department’s/school’s information including latest news


window.

HTML

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Department/School Information</title>

<link rel="stylesheet" href="style.css">

</head>

<body>

<header>

<h1>Department/School Name</h1>

<nav>

<ul>

<li><a href="#about">About</a></li>

<li><a href="#programs">Programs</a></li>

<li><a href="#faculty">Faculty</a></li>

<li><a href="#contact">Contact</a></li>

</ul>

</nav>

</header>

<main>

<section id="latest-news">

<h2>Latest News</h2>

<ul id="news-list">

<li><a href="#">News item 1</a></li>


<li><a href="#">News item 2</a></li>

<li><a href="#">News item 3</a></li>

</ul>

</section>

<section id="about">

<h2>About</h2>

<p>Insert department/school information here.</p>

</section>

<section id="programs">

<h2>Programs</h2>

<ul>

<li>Program 1</li>

<li>Program 2</li>

<li>Program 3</li>

</ul>

</section>

<section id="faculty">

<h2>Faculty</h2>

<ul>

<li>Faculty member 1</li>

<li>Faculty member 2</li>

<li>Faculty member 3</li>

</ul>

</section>

<section id="contact">

<h2>Contact</h2>
<p>Insert contact information here.</p>

</section>

</main>

<footer>

<p>Copyright © Manvendra Singh/School of computer science</p>

</footer>

<script src="script.js"></script>

</body>

</html>

CSS

body {

font-family: Arial, sans-serif;

margin: 0;

padding: 0;

header {

background-color: #333;

color: #fff;

padding: 20px;

display: flex;

justify-content: space-between;

align-items: center;

nav ul {

list-style: none;

margin: 0;
padding: 0;

display: flex;

nav li {

margin-right: 20px;

nav a {

color: #fff;

text-decoration: none;

nav a:hover {

text-decoration: underline;

main {

padding: 20px;

section {

margin-bottom: 20px;

h2 {

margin-top: 0;

ul {

list-style: disc;

footer {
background-color: #333;

color: #fff;

padding: 10px;

text-align: center;

#news-list {

margin: 0;

padding: 0;

#news-list li {

margin-bottom: 10px;

JAVA SCRIPT

var xhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function()

OUTPUT
Question 2.Design a web page illustrating different concepts of hyperlinks in html including
bookmarks.

HTML
<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Hyperlinks in HTML</title>

<link rel="stylesheet" href="style.css">

</head>

<body>

<header>

<h1>Hyperlinks in HTML</h1>

</header>

<main>

<section>

<h2>Types of Hyperlinks</h2>

<ul>

<li><a href="#">Absolute Hyperlink</a></li>

<li><a href="relative.html">Relative Hyperlink</a></li>

<li><a href="https://www.google.com">External Hyperlink</a></li>

<li><a href="mailto:[email protected]">Email Hyperlink</a></li>

<li><a href="tel:+1234567890">Telephone Hyperlink</a></li>

</ul>

</section>

<section>

<h2>Linking to Specific Parts of a Page</h2>

<p>To create a bookmark, use the <code>&lt;a&gt;</code> tag with the

<code>id</code> attribute:</p>
<pre>&lt;h2 id="section1"&gt;Section 1&lt;/h2&gt;</pre>

<p>Then create a hyperlink to the bookmark using the <code>&lt;a&gt;</code>

tag with the <code>href</code> attribute set to <code>#section1</code>:</p>

<pre>&lt;a href="#section1"&gt;Link to Section 1&lt;/a&gt;</pre>

</section>

<section>

<h2>Linking to External Resources</h2>

<p>To link to external resources such as images, stylesheets, and scripts, use the

<code>&lt;link&gt;</code> tag:</p>

<pre>&lt;link rel="stylesheet" href="style.css"&gt;</pre>

</section>

</main>

<footer>

<p>Copyright © Hyperlinks in HTML</p>

</footer>

</body>

</html>

CSS
body {

font-family: Arial, sans-serif;

margin: 0;

padding: 0;

header {

background-color: #333;

color: #fff;

padding: 20px;

text-align: center;

}
main {

padding: 20px;

section {

margin-bottom: 20px;

h2 {

margin-top: 0;

ul {

list-style: disc;

margin-left: 20px;

pre {

background-color: #eee;

padding: 10px;

border: 1px solid #ccc;

footer {

background-color: #333;

color: #fff;

padding: 10px;

text-align: center;

}
OUTPUT

You might also like