Creating Simple Web Pages in HTML: A Quick Cheatsheet
HTML (HyperText Markup Language) is the foundation of web development. It provides the structure for web pages, allowing you to create headings, paragraphs, links, images, and more. Whether you're a beginner or need a quick refresher, this cheatsheet will guide you through the basics of creating simple web pages in HTML. Basic Structure of an HTML Document Every HTML document follows a standard structure. Here's the skeleton of a basic HTML page: Page Title : Declares the document type and version of HTML (HTML5 in this case). : The root element that wraps all content on the page. : Contains meta-information about the document, such as the title and character set. : Where the visible content of the web page is placed. Adding Content to Your Web Page 1. Headings Headings are used to define the hierarchy of your content. There are six levels of headings, from (most important) to (least important). Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 2. Paragraphs Use the tag to add paragraphs of text. This is a paragraph. This is another paragraph. 3. Links Links are created using the tag. The href attribute specifies the destination URL. Visit Example 4. Images Images are added using the tag. The src attribute specifies the image file path, and the alt attribute provides alternative text for accessibility. Organizing Content 1. Lists HTML supports both unordered () and ordered () lists. Unordered List Item 1 Unordered List Item 2 Ordered List Item 1 Ordered List Item 2 2. Tables Tables are created using the , , , and tags. Header 1 Header 2 Data 1 Data 2 Forms for User Input Forms allow users to submit data. Use the tag with elements for text, email, buttons, and more. Name: Email: Additional Elements 1. Buttons Buttons can be created using the tag. Click Me 2. Line Breaks and Horizontal Rules Use for line breaks and for horizontal rules. This is the first line.This is the second line. 3. Divisions and Spans : A block-level container for grouping content. : An inline container for styling or grouping text. This is inside a div. This is a span inside a paragraph. Comments Comments are notes in your code that are not displayed in the browser. They are written as follows: Putting It All Together Here’s a complete example of a simple web page: My First Web Page Welcome to My Website This is a simple web page created using HTML. Visit Example Item 1 Item 2 Name: Conclusion With these basic HTML elements, you can create simple yet functional web pages. As you progress, you can enhance your pages with CSS for styling and JavaScript for interactivity.

HTML (HyperText Markup Language) is the foundation of web development. It provides the structure for web pages, allowing you to create headings, paragraphs, links, images, and more. Whether you're a beginner or need a quick refresher, this cheatsheet will guide you through the basics of creating simple web pages in HTML.
Basic Structure of an HTML Document
Every HTML document follows a standard structure. Here's the skeleton of a basic HTML page:
lang="en">
charset="UTF-8">
name="viewport" content="width=device-width, initial-scale=1.0">
Page Title
-
: Declares the document type and version of HTML (HTML5 in this case).
-
: The root element that wraps all content on the page.
-
: Contains meta-information about the document, such as the title and character set.
-
: Where the visible content of the web page is placed.
Adding Content to Your Web Page
1. Headings
Headings are used to define the hierarchy of your content. There are six levels of headings, from (most important) to
(least important).
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
2. Paragraphs
Use the tag to add paragraphs of text.
This is a paragraph.
This is another paragraph.
3. Links
Links are created using the tag. The
href
attribute specifies the destination URL.
4. Images
Images are added using the
tag. The src
attribute specifies the image file path, and the alt
attribute provides alternative text for accessibility.
src="image.jpg" alt="Description of image">
Organizing Content
1. Lists
HTML supports both unordered (
) and ordered (
) lists.
Unordered List Item 1
Unordered List Item 2
Ordered List Item 1
Ordered List Item 2
2. Tables
Tables are created using the Forms allow users to submit data. Use the Buttons can be created using the Use Comments are notes in your code that are not displayed in the browser. They are written as follows: Here’s a complete example of a simple web page: With these basic HTML elements, you can create simple yet functional web pages. As you progress, you can enhance your pages with CSS for styling and JavaScript for interactivity. ,
, , and tags.
Header 1
Header 2
Data 1
Data 2
Forms for User Input
tag with
elements for text, email, buttons, and more.
Additional Elements
1. Buttons
tag.
Click Me
2. Line Breaks and Horizontal Rules
for line breaks and
for horizontal rules.
This is the first line.
This is the second line.
3. Divisions and Spans
: An inline container for styling or grouping text.
Comments
Putting It All Together
lang="en">
charset="UTF-8">
name="viewport" content="width=device-width, initial-scale=1.0">
src="image.jpg" alt="Sample Image">
Item 1
Item 2
Conclusion