The Basic HTML Tags For Beginners: Cheat Sheet

HTML tags cheat sheet

HTML is the markup language used to create web pages. It’s a simple language that can be learned relatively easily and can come in handy for creating basic web pages or editing code on existing pages. In this article, we’ll provide a basic HTML cheat sheet for beginners, along with a brief description of what each one does.

But before you explore this list of basic HTML tags for beginners, understand the basics of HTML and how it works.

What Is HTML, And What Does It Do?

What is HTML?
Image Source – Google | Image By – Code Brainer

HTML is the basic building block of the internet. It is a language used to create websites and web pages. HTML stands for HyperText Markup Language. This means that it uses tags to identify and structure content. HTML tags are denoted by angle brackets < and >. Most HTML tags are open-ended, meaning they have a start tag and an end tag. The content between the start and end tags is known as the element’s content. 

Here’s an example of an HTML document:

<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
Hello, world!
</body>
</html>

The first line of this document is a DOCTYPE declaration. This tells the browser which version of HTML the document is written in.

The <html> tag is the root element of an HTML document. It contains all the other elements.

The <head> tag contains information about the document, such as the title.

The <body> tag contains the main content of the document.

In this document, we have one paragraph of text. The text is contained within the <p> tags.

We can also add formatting to our text, bold and italics. This is done by adding HTML attributes to the <p> tags.

<p style="font-style:italic;">This is an italic paragraph.
</p><p style="font-weight:bold;">This is a bold paragraph.</p>

Read the Related Article- Best programming language for full stack developer

How To Use HTML Tags To Create Or Edit A Web Page?

Html tags and attributes
Image Source – Google | Image By – Book flow

If you’re new, you’ll need to know about the types of Basic HTML tags for beginners to create a web page even before you use HTML tags. These codes tell a web browser how to display a web page. There are two types of HTML tags: opening tags and closing tags.

Opening tags are the start of an HTML tag. They always have a less-than symbol (<), followed by the tag’s name. Closing tags are the end of an HTML tag. They always have a greater-than symbol (>), followed by the tag’s name.

There are many basic HTML tags for beginners, but here are some of the most common ones:

<head> – The <head> tag contains information about the web page, including the title and the keywords.

<body> – The <body> tag contains the content of the web page.

<h1> – The <h1> tag is used to create a headline.

<p> – The <p> tag is used to create a paragraph.

<a> – The <a> tag is used to create a hyperlink.

Here’s an example of how HTML tags work:

<html>
<head>
<title>My Web Page</title>
</head>
<body bgcolor="blue">
This is my web page!
</body>
</html>

In this example, the <html>, <head>, and <body> tags are all opening tags. The <title>, <bgcolor>, and <p> tags are all closing tags.

You can also use HTML tags to edit an existing web page. To do this, you’ll need to open the HTML file in a text editor like Notepad or TextEdit. Then, you’ll need to find the section of the file that contains the content you want to change.

HTML tags
Image Source – Google | Image By – Morioh

You’ll need to add or change the HTML tags to edit the content. Here’s an example of how you might edit a web page:

<html>
<head>
</head>
<body>
Hello, world!
</body>
</html>

In this example, the <html>, <head>, and <body> tags are all opening tags. The <h1> and <p> tags are closing tags.

You can also use HTML tags to create a new web page from scratch. To do this, you’ll need to create a text file containing the page’s HTML code. Then, you’ll need to upload the file to a web server.

Here’s an example of a simple HTML code file:

<html>
<head>
</head>
<body>
Hello, world!
</body>
</html>

In this example, the <html>, <head>, and <body> tags are all opening tags. The <p> tag is a closing tag.

Common HTML Tags And Attributes For Beginners

Tags-in-HTML
Image Source- Google, Image By- Data Flair

You can use any HTML tags to enhance your web pages. However, it can be tough for beginners to remember all of them. That’s why we’ve put together the ultimate HTML tags cheat sheet – complete with the most commonly used tags and a brief description of what each one does!

1. Header Tags

These are used to indicate different levels of headings in your content. The most common header tags are h1, h2, and h3.

h1 is the most important header tag, followed by h2, then h3. Use these tags to structure your content and make it easier for readers to scan.

2. Paragraphs

Para tags denote paragraphs of text. They’re essential for separating your content into easily scannable chunks.

3. Bold and italics

Use b tags for bold text and i tags for italics. This is a great way to add emphasis to certain words or phrases.

4. Lists

Use ul (unordered lists) and ol (ordered lists) tags to create bulleted and numbered lists. This is a great way to organize your content and make it easier to read.

5. Links

A href tag is used to create links to other web pages. When a reader clicks on the link, they’ll be taken to the page you’ve linked to.

6. Images

img tags are used to add images to your webpage. You can also use attributes like src (the source of the image), alt (an alternate text for the image), and height and width (the dimensions of the image).

Conclusion

The HTML tag cheat sheet we’ve provided is a great way to get started with using HTML tags on your web pages. It includes the most commonly used tags and a brief description of what each one does. Be sure to bookmark this page, so you can come back to it whenever you need help adding formatting and structure to your content.

Leave a Reply

Your email address will not be published. Required fields are marked *