A Beginner's Journey to Building My first Webpage with HTML and Git
Are you ready to unlock the secrets of the web and bring your vision to life? Building your first webpage is more than just coding – it's about creating a platform to express yourself, share your ideas, and connect with the world. With HTML and Git as your foundation, you'll embark on a journey that combines creativity, technical skills, and innovation. In this article, we'll walk you through the step-by-step process of creating your first webpage, empowering you to take the leap and become a web development rockstar.
But before then it is important to have a basic Knowledge of
What is HTML?
what is Git ?
HTML (HyperText Markup Language) is the standard language used to create web pages. It provides the structure of a webpage by using a system of elements and tags that define different types of content, such as headings, paragraphs, images, and links.
HTML is not a programming language but a markup language, meaning it structures content rather than performing logic or computations. Web browsers interpret HTML to display content correctly on websites.
Syntax Of HTML
As a beginer you also need to know the Basic Syntax of HTML, which is refer to as the set of rules that define how HTML elements should be written and structured to create a valid webpage. HTML uses tags, attributes, and a hierarchical structure to organize content. Syntax Of HTML can also be referd to as the unforgiving rules of HTML.
Some Of this Syntax include
1. HTML Document Structure
HTML document is structured to define both the metadata and the content of a webpage, ensuring that browsers can interpret and display it correctly. Here's a breakdown of the essential components
this structures includes.
```
<!DOCTYPE html>: Declares the document as HTML5.
• <html lang="en">: Sets the document's language to English.
• <head>: Contains meta-information like the character set and title.
• <meta charset="UTF-8">: Specifies the character encoding as UTF-8.
• <title>: Defines the title shown in the browser tab.
• <body>: Includes the visible content of the webpage.
```
HTML tags are the fundamental building blocks of HTML (HyperText Markup Language) documents. They define the structure and content of a webpage, instructing web browsers on how to display text, images, links, and other elements.
Structure Of HTML tags
1. Opening Tag: Marks the beginning of an element and is enclosed in angle brackets. For example, <p> starts a paragraph.
2.Closing Tag: Indicates the end of an element, similar to the opening tag but with a forward slash before the tag name, like </p>.
Some tags are self-closing and don't enclose content, such as <img> for images.
Commonly Used HTML Tags:
```
<html>: The root element that contains all other elements in the document.
• <head>: Contains meta-information about the document, like its title and links to stylesheets.
• <title>: Sets the title of the webpage, displayed in the browser tab.
• <body>: Encloses the content visible to users, such as text, images, and links.
• <h1> to <h6>: Define headings, with <h1> being the highest level and <h6> the lowest.
• <p>: Denotes a paragraph of text.
• <a>: Creates a hyperlink; the href attribute specifies the URL.
• <img>: Embeds an image; the src attribute defines the image source.
• <ul> and <ol>: Create unordered (bulleted) and ordered (numbered) lists, respectively.
• <li>: Represents a list item within <ul> or <ol>.
• <div>: Defines a division or section, often used for grouping content for styling purposes.
• <span>: Used to apply styles to a specific
```
Each tag can have attributes that provide additional information or modify its behavior. For example, the <a> tag's href attribute specifies the destination URL, and the <img> tag's alt attribute provides alternative text for the image.
Understanding HTML tags is essential for creating and structuring web content effectively.
Now let Me also work you through what Git is.
Git is a distributed version control system (VCS), which means it helps you track the history of changes to your files (usually source code) over time and enables collaboration between developers. It is widely used in software development because of its speed, flexibility, and ability to manage large codebases effectively.
Git Basics Concepts
a) Repository (Repo)
A repository is a project folder that Git tracks. It contains all files and their history of changes.
• Local Repository: Exists on your computer.
• Remote Repository: Hosted on a platform like GitHub, GitLab, or Bitbucket for collaboration.
b) Working Directory, Staging Area, and Commit History
• Working Directory: The current state of your files in the project.
• Staging Area: A temporary place where files are added before committing.
• Commit History: A record of saved changes over time.
c) Commit
A commit is a snapshot of your code at a specific point in time. Each commit has a unique identifier (hash).
d) Branching & Merging
• Branching: Creating a separate line of development to work on new features without affecting the main code.
• Merging: Combining changes from different branches.
e) Remote Repositories
• Push: Upload local commits to a remote repository.
• Pull: Download the latest changes from a remote repository.
Git Basic Comands.
Having understood What HTML and Git is lets dive into creating our first Webpage as a beginner.
Step One
Define And understand the purpose and content of your webpage. Determine the layout, text, images, and other elements you want to include Example I am creating A portfolio website For Racy.
Step Two
Choose a Text Editor
Select a text editor (e.g., Notepad, TextEdit, Sublime Text, Visual Studio Code Etc) to write your HTML code.
Step Three
Create a New File
Open your text editor and create a new file. Save it with an ".html" extension (e.g., "racy-Portfolio.html").
Note: always remember to use lowercase for for naming your file.
Step Four
Set Up the Basic HTML Structure
Understand the basic structure of an HTML document, including the doctype declaration, HTML tag, head tag, and body tag Example .
```
<!DOCTYPE html>
<html>
<head>
<title>Racy Portfolio</title>
</head>
<body>
</body>
</html>
```
Step 5
Add Head Section Elements Include metadata, such as the title, character encoding, and links to external stylesheets or scripts example .
```
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
<meta charset="UTF-8">
<meta name="description" content="This is my first webpage">
<meta name="keywords" content="HTML">
<meta name="author" content="Racy">
</head>
<body>
</body>
</html>
```
Step Six.
Move forward to creating you first webpage example
```
<!DOCTYPE html>
<html>
<head>
<title>Racy Portfolio</title>
</head>
<body>
<header>
<h1>Racy Portfolio</h1>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<section id="home">
<h1>Welcome to Racy Portfolio</h1>
<p>This is a sample portfolio webpage.</p>
</section>
<section id="about">
<h1>About Me</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet nulla auctor, vestibulum magna sed, convallis ex.</p>
</section>
<section id="projects">
<h1>My Projects</h1>
<ul>
<li>
<h2>Project 1</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</li>
<li>
<h2>Project 2</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</li>
</ul>
</section>
<section id="contact">
<h1>Get in Touch</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<ul>
<li>Email: <a href="mailto:racy@example.com">racy@example.com</a></li>
<li>Phone: 123-456-7890</li>
</ul>
</section>
<footer>
<p>© 2023 Racy Portfolio</p>
</footer>
</body>
</html>
```
Now you can save this and open it on your brow And that's a wrap. You have creat your very first HTML portfolio webpage! You've taken the first step towards showcasing your skills and creativity to the world. Remember, this is just the beginning - keep learning, experimenting, and pushing the boundaries of what's possible. Your online presence is waiting to be unleashe.