Cheat Sheet For HTML Tags

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 cheat sheet for HTML tags of images, videos, background color, etc. 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 Are HTML Tags, And What Do They 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 Tags 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 HTML tag for text is <p>.

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

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

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

HTML Usage Code Screenshot
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 HTML 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:

HTML tags are enclosed in <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 or HTML tag for text

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

Here’s an example of how HTML tags for background color work:

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

In this example, the HTML tags are enclosed in – <html>, <head>, and <body>These 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 table tags
Image Source – Google | Image By – Morioh

To edit the content you’ll need to add or change HTML tags. Here’s an example of how you might edit a web page and HTML tags for text, image, video, background color, etc.

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

In this example, the <html>, <head>, and <body> tags are all opening tags. The </body> and </html> 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 pages for HTML code. Then, you’ll need to upload the file to a web server.

Here’s a simple example of an 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 </body> tag is a closing tag.

Common HTML Tags And Attributes For Beginners

Tags in HTML
Tags in HTML

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 cheat sheet for HTML code – 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

In the HTML tag cheat sheet, we’ve provided a great way to get started with using HTML tags for text, images, videos, background color, etc 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.

Latest Articles

Leave a Reply

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