1. HTML Basics

HTML Basics is the foundation of web development. It introduces you to the core components of HTML, which are essential for creating and structuring web pages. Understanding the basic elements, tags, and attributes will empower you to build simple yet functional websites. In this chapter, you'll learn how HTML forms the backbone of every webpage, from paragraphs and headings to links and images.


2.Understanding HTML Elements

HTML elements are the building blocks of every webpage. An HTML element typically consists of three parts:
Opening tag: This tells the browser that a specific element is about to start. For example, <p> is the tag for a paragraph.
Content: The actual text or media that is displayed between the opening and closing tags. Closing tag: This indicates the end of an element, written like this: </p>
Example:
				
					<p>This is an HTML paragraph.</p>

				
			


3. HTML Attributes

Attributes provide extra information about an element. They are included in the opening tag and typically look like this: attribute="value". For instance, the href attribute in a link defines the destination URL.
Example:
A link (< a>) element with an attribute might look like: < a href="https://www.digitalerena.com">Visit digitalerena


4. Common HTML Tags

Below are some commonly used HTML tags that form the structure of web content:

Paragraphs: Used to create blocks of text. The paragraph element is represented by the <p> tag.

Headings: HTML offers six levels of headings, ranging from <h1> to <h6>. These are used to create structured content and organize information hierarchically.

Lists: HTML supports both ordered (<ol>) and unordered (<ul>) lists. Ordered lists are numbered, while unordered lists are bulleted.

Divisions: The <div> tag is a container used to group elements together. It doesn't add any formatting by itself but is useful for structuring your HTML and applying styles or scripts.

5. Basic Page Structure
All HTML documents follow a specific structure .
DOCTYPE: Informs the browser that the document is an HTML5 file.
HTML Tag: The root element of any HTML document.
Head Section: Contains metadata like the title and links to stylesheets.
Body Section: Contains the content that will be visible to users, such as text, images, and links.
				
					<!DOCTYPE html>
<html>
  <head>
    <title>Welcome to Bank</title>
  </head>
  <body>
    <h1>Bank - Your Trusted Financial Partner</h1>
    <p>At Bank, we are committed to providing secure and reliable banking solutions to help you manage your finances with ease.</p>
  </body>
</html>

				
			

6. Comments in HTML
HTML allows you to add comments that are not displayed on the webpage. Comments are useful for explaining the code or leaving notes for other developers.
				
					<p>this is a comment</p>

				
			

7. Conclusion
Chapter 3 introduced the fundamental concepts of HTML, including elements, attributes, and the basic structure of an HTML document. In the next chapter, you will learn how to add links and images to your web pages, enhancing their interactivity and visual appeal.
×