Lecture Notes Of Class 20
Project - Building a Personal Web
Page
Objective:
In this class, students will plan and start
developing a personal web page project using HTML. This project will help
students understand how to structure a web page, organize content, and use
various HTML elements to create a functional and visually appealing personal
web page.
Outcome:
By the end of this class, students will have:
- Created the basic layout and
structure of their personal web page.
- Incorporated various HTML elements
such as headings, paragraphs, images, links, and lists.
- Learned how to organize content on
a webpage using appropriate tags.
Introduction to Building a Personal Web Page
A personal web page is an excellent way to
showcase your interests, skills, and experience. It's a simple project where
you will use HTML to create the structure of your web page, which may include
sections like an introduction, portfolio, contact information, and more.
Step 1: Plan the Layout of the Web Page
Before jumping into coding, it is important
to plan how your web page will look and what content it will include. Think
about the following:
- Header: This could contain your name,
title (e.g., "Web Developer"), and a navigation bar.
- Main Content: You can include
sections like an introduction about yourself, portfolio, skills, or
hobbies.
- Footer: This might include your
contact details or social media links.
Here’s a basic layout plan:
- Header Section: Name, title, and
navigation links.
- About Me Section: A brief
introduction about yourself.
- Skills Section: Highlight the
skills you want to showcase.
- Portfolio Section: Show some of your
past work or projects.
- Contact Section: Provide your
contact information or a contact form.
- Footer Section: Include copyright
and social media links.
Step 2: Setting Up Your HTML Structure
Once the layout is planned, it’s time to
create the basic HTML structure. Here’s a simple outline:
1. Create
a New HTML File Open a text editor (such as Notepad or VS
Code) and create a new file named index.html
.
2. Basic HTML Structure
Here’s the basic structure that you’ll start
with:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"
content="width=device-width, initial-scale=1.0"> <title>Your Name - Personal Web Page</title> </head> <body> <!-- Header Section --> <header> <h1>Your Name</h1> <p>Web Developer</p> <nav> <ul>
<li><a href="#about">About Me</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li> </ul> </nav> </header> <!-- About Me Section --> <section id="about"> <h2>About Me</h2> <p>This is a short
introduction about yourself. You can talk about your background, interests,
and goals.</p> </section> <!-- Skills Section --> <section id="skills"> <h2>Skills</h2> <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> </section> <!-- Portfolio Section --> <section id="portfolio"> <h2>Portfolio</h2> <p>Showcase some of
your previous work here, such as images, projects, or descriptions of what
you have worked on.</p> </section> <!-- Contact Section --> <section id="contact"> <h2>Contact</h2> <p>Email:
your.email@example.com</p> </section> <!-- Footer Section --> <footer> <p>© 2024
Your Name. All rights reserved.</p> </footer> </body> </html> |
Step 3: Understanding the Structure
Let’s break down the HTML structure used in
this project:
<!DOCTYPE html>
: This declaration defines the document type and version of HTML (HTML5 in this case).<html lang="en">
: This tag wraps all your content and defines the language as English (en
).<head>
: The head section contains metadata like the character set, viewport settings for responsive design, and the page title.<body>
: This section contains the visible content of your webpage.<header>
: Contains your name, title, and a navigation bar.<section>
: Each section tag is used to group related content. In this case, sections for "About Me," "Skills," "Portfolio," and "Contact."<footer>
: Contains footer information such as copyright notice.
Step 4: Adding Content and Styling
- Headings and Paragraphs: Use headings (
<h1>
,<h2>
, etc.) to create a hierarchy of content. Paragraphs are created using the<p>
tag. - Navigation Links: Use the
<nav>
element to wrap the navigation links, and<ul>
(unordered list) with<li>
(list items) for each link. - Lists: You can display your skills
using an ordered (
<ol>
) or unordered (<ul>
) list, as shown in the skills section. - Images: To add an image, use the
<img>
tag with thesrc
attribute to point to the image file:
<img src="your-image.jpg" alt="Description of image"> |
- Links: To create a link, use the
<a>
tag with thehref
attribute:
<a href="https://www.example.com"> |
Step 5: Testing and Viewing Your Web Page
Once you have finished writing the HTML code:
1. Save the file as index.html
.
2. Open it in any web browser (Chrome, Firefox,
etc.).
3. Check how it appears on the page. You should
see your name, a navigation bar, and sections like "About Me,"
"Skills," and "Contact."
Step 6: Homework/Next Steps
For homework or further development, students
can:
- Add more personal sections, such as
a list of hobbies or a detailed portfolio.
- Customize the design by adding
inline CSS for basic styling (such as setting background colors or font
styles).
- Include links to your social media
profiles (LinkedIn, GitHub, etc.).
- Add a contact form where people can
reach out to you.
Here is a basic example of inline CSS to add
some style:
<style> body { font-family: Arial,
sans-serif; line-height: 1.6; background-color: #f4f4f4; margin: 0; padding: 0; } header { background-color: #333; color: white; padding: 10px 0; text-align: center; } nav ul { list-style: none; padding: 0; } nav ul li { display: inline; margin-right: 10px; } nav ul li a { color: white; text-decoration: none; } </style> |
Conclusion:
In this class, you started developing the basic structure for a personal web page. You learned how to use different HTML elements to organize content effectively and how to plan the layout. In future lessons, you will continue enhancing your web page with additional features and styling techniques to make it visually appealing and interactive.