HTML Practical: Creating a Multi-Page Website Using HTML
This practical explains how to create a departmental website using HTML only, without CSS. The website contains a main page, navigation menu, calendar, achievements, library resources, application form, and OPAC page.
Step 1: Create a Folder
Create a folder named DepartmentWebsite on your computer. Save all the following files inside it.
DepartmentWebsite/
index.html
navbar.html
main.html
calendar.html
achievements.html
resources.html
application.html
OPAC.html
Open Notepad, write the HTML code, and save each file with its specified filename. In Notepad, choose Save as type: All Files.
Step 2: Create the Main Page (index.html)
The main page divides the browser window into two sections using HTML frames. The left section contains the navigation menu, and the right section displays the selected page.
Code for index.html
Explanation
<frameset cols="25%,75%">divides the window into two vertical sections.<frame src="navbar.html">displays the navigation menu.<frame src="main.html">displays the welcome page.name="contentFrame"identifies the frame where linked pages will open.
Note: The frameset method is obsolete in modern HTML, but it is included here for learning purposes and for reproducing older HTML practicals.
Step 3: Create the Navigation Menu (navbar.html)
The navigation menu contains links to all the other pages of the website.
Code for navbar.html
Explanation
<a>creates a hyperlink.hrefspecifies the destination file.target="contentFrame"opens the linked page in the right-hand frame.<br>moves the next item to a new line.<center>centres the content. This is an older HTML element and is obsolete in modern HTML.
Step 4: Create the Main Content Page (main.html)
This page displays the welcome message and introduction to the department.
Code for main.html
Step 5: Create the Calendar Page (calendar.html)
An HTML table can be used to create a calendar. The <table> element creates the table, <tr> creates rows, and <th> and <td> create heading and data cells.
Code for calendar.html
Note: The example demonstrates table construction. Verify the calendar year and institutional event dates before using it as an actual calendar. August 15 is India's Independence Day.
Step 6: Create the Achievements Page (achievements.html)
This page lists the achievements and activities of the department.
Code for achievements.html
Explanation
<ul>creates an unordered list.<li>creates an individual list item.<h2>creates a secondary heading.
Step 7: Create the Library Resources Page (resources.html)
This page contains links to useful educational and research resources.
Code for resources.html
Step 8: Create the Application Form (application.html)
The application form demonstrates HTML form controls such as text fields, radio buttons, checkboxes, dropdown menus, textareas and buttons.
Code for application.html
Important HTML form elements
| Element | Purpose |
|---|---|
<form> |
Groups form controls. |
type="text" |
Accepts text input. |
type="email" |
Accepts an email address and provides basic browser validation. |
type="radio" |
Allows one selection from a group with the same name. |
type="checkbox" |
Allows multiple selections. |
<select> |
Creates a dropdown menu. |
<option> |
Defines a choice in the dropdown menu. |
<textarea> |
Accepts longer text or feedback. |
type="reset" |
Resets the form controls. |
type="submit" |
Attempts to submit the form. |
Important: This is a demonstration form. The action="#" attribute does not provide a working system for storing applications. A server-side application or form service is needed to collect and store submissions.
Step 9: Create the OPAC Page (OPAC.html)
OPAC stands for Online Public Access Catalogue. It helps users search for books and other library materials by title, author, subject or keyword.
Code for OPAC.html
How to search an OPAC
- Open the library catalogue website.
- Select a search option, such as Title, Author or Subject.
- Enter the required search term.
- Click the Search button.
- Review the results and bibliographic details.
- Check the item's availability and shelf location.
WorldCat is provided as an example of a catalogue discovery service. Replace its link with your institution's OPAC address when available.
Step 10: Connect All the Pages
Check that all the HTML files are saved in the same folder and that their filenames match the navigation links.
| Navigation Link | Destination File |
|---|---|
| Home | main.html |
| Our Calendar | calendar.html |
| Our Achievements | achievements.html |
| Our Sources | resources.html |
| Application Form | application.html |
| OPAC | OPAC.html |
For example, this link opens the achievements page inside the frame named contentFrame.
Step 11: Open and Test the Website
- Open the DepartmentWebsite folder.
- Double-click index.html.
- Check whether the navigation menu appears on the left and the welcome page appears on the right.
- Click Our Calendar and check whether the calendar appears.
- Open Our Achievements and Our Sources.
- Test the Application Form and OPAC links.
- Click Home to return to the welcome page.
- Correct any errors in filenames or links.
Common errors and solutions
| Error | Solution |
|---|---|
| A page does not open. | Check the filename and file extension. |
| A page opens in a new tab. | Check the target attribute and the name of the destination frame. |
| HTML code appears as plain text. | Check whether the file was saved with the .html extension. |
| The form does not store information. | Connect it to a suitable backend or form service. |
| An image does not appear. | Check the image filename and location. |
Step 12: Understand the Website Structure
The main page loads the navigation menu and the welcome page. When a visitor clicks a navigation link, the selected HTML file opens in the content frame.
index.html
|
|-- navbar.html
|
|-- main.html
|
|-- calendar.html
|-- achievements.html
|-- resources.html
|-- application.html
|-- OPAC.html
The pages are separate files. The navigation menu connects them through hyperlinks, and the main layout provides the two-section browser display.
Step 13: Alternative Using the Older frameset Method
If your practical specifically requires a separate frameset file, create a file named frames.html.
The attribute cols="25%,75%" divides the browser window into two vertical sections. The first frame occupies 25% of the width and the second occupies 75%.
Note: The frameset method is obsolete in modern HTML. Use it for historical practical exercises only. For new websites, use modern HTML layout techniques.
Step 14: Add a Department Logo
You can add the department logo to the main page using the <img> tag.
Save the image as department-logo.png in the same folder as main.html. If the filename or location differs, update the src attribute.
Step 15: Final Checklist
- All HTML files are saved in the correct folder.
- The main page opens successfully.
- The navigation menu displays all required links.
- Each link opens the correct page in the content frame.
- The calendar table is correctly arranged.
- The achievements and resources pages contain relevant information.
- The application form contains text fields, radio buttons, checkboxes, a dropdown and a feedback area.
- The OPAC page contains search instructions and a relevant catalogue link.
- The department logo appears correctly.
- All links and filenames have been tested.
Practical outcome: You have created a multi-page departmental website using basic HTML without CSS. The website includes a main page, navigation menu, calendar, achievements, library resources, application form, OPAC page and department logo.
Department
|
Welcome to the Department of Library ScienceMinistry of Electronics and Information Technology Government of India About Our DepartmentThe Department of Library Science promotes the study of library management, information organisation, information retrieval and digital information services. The department supports students through academic resources, practical training, seminars and research activities. Use the navigation menu on the left to explore our calendar, achievements, resources, application form and OPAC. Latest Updates
|
