Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.

Get Started Now!

Why html is markup language?

In HTML, We are writing the code in tags format and all the tags are predefine that why html is markup language.

Tag: Tag, The text which is surrounding by angular bracket is known as tags.

There are two type of tag:

  • Paired tag
  • Unpaired tag/ Self-Closing tag

Paired tag: In paired tag there is both tag, Opening tab and Closing tag is known as paired tags.

Syntax: <tag> </tag>

Example of paired tag:

<html> </html>

<body> </body>

<head> </head>

<div> </div>

<p> </p>

<a> </a>

… etc.

or

Paired tags:

Paired tags, or elements with both opening and closing tags, enclose content and define its boundaries. They consist of an opening tag, some content, and a closing tag.

Example:

<h1>Welcome to My Website</h1>
<p>This is a paragraph of text.</p>
<a href="https://example.com">Visit Example</a>

In these examples:

  • <h1> is the opening tag for a heading element, and </h1> is the closing tag. The content “Welcome to My Website” is enclosed between them.
  • <p> is the opening tag for a paragraph element, and </p> is the closing tag. The content “This is a paragraph of text.” is enclosed between them.
  • <a href="https://example.com"> is the opening tag for a hyperlink, and </a> is the closing tag. The content “Visit Example” is the clickable text for the link.

Paired tags help organize and structure the content on a webpage.

Unpaired tag/ Self-Closing tag:

Unpaired tags, or self-closing tags, are HTML elements that don’t require a separate closing tag. They are used for elements that don’t have any content between an opening and closing tag.

Example:

<img src="image.jpg" alt="Description of image">
<br>
<hr>

In this example:

  • <img> is used to embed an image. It has attributes like src (source) and alt (alternative text). It doesn’t require a closing tag.
  • <br> is used to insert a line break. It also doesn’t require a closing tag.
  • <hr> is used to create a horizontal rule or line. It too is self-closing.

In HTML5, the self-closing slash (/) is optional, so you may often see these tags written without it, like <img src="image.jpg" alt="Description of image">.

Note:- All the tag are predefine its means we can’t create, change and destroy the tag, Only we can use according to out requirement.

Related Posts

How to Run an HTML Website Alongside a Laravel Project on the Same Server

Running a Laravel application is common for dynamic web platforms, dashboards, and APIs. However, many businesses and developers also want to run a simple HTML website on Read More

Read More

What is HTTP and What is top use cases of HTTP ?

What is HTTP ? HTTP, or Hypertext Transfer Protocol, is an application layer protocol used primarily with the World Wide Web in the client-server model. It was Read More

Read More

Understanding SEO: Exploring Its Principles and Varied Types

Introduction to SEO SEO stands for Search Engine Optimization. It’s the process of improving your website to increase its visibility in search engine results pages (SERPs). In Read More

Read More

Creating Simple HTML Form

Job Application Form Using HTML Output:

Read More

HTML Basic Structure

HTML Documents: All HTML documents must start with a document type declaration: <!DOCTYPE html>. The HTML document begins with <html> and ends with </html>. The visible part of the HTML document Read More

Read More

HTML Headings:

HTML heading describe what type of heading given in html pages. There are six type of html headings using in html Syntax: <h1> This is heading 1 Read More

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x