HTML tags and attributes are the building blocks of HTML documents. Tags are used to structure content on a web page, while attributes are used to provide additional information about the tag. Here are some examples of HTML tags and attributes:

  1. Heading Tags: These tags are used to create headings on a web page, with h1 being the largest and most important heading, and h6 being the smallest.
<h1>This is a level 1 heading</h1>
<h2>This is a level 2 heading</h2>
<h3>This is a level 3 heading</h3>
  1. Paragraph Tags: These tags are used to create paragraphs of text on a web page.
<p>This is a paragraph of text.</p>
  1. Anchor Tags: These tags are used to create links to other pages or websites.
<a href="http://www.example.com">Link to Example Website</a>
  1. Image Tags: These tags are used to display images on a web page.
<img src="image.jpg" alt="A picture of a sunset">
  1. List Tags: These tags are used to create ordered and unordered lists on a web page.
<ul>
   <li>Item 1</li>
   <li>Item 2</li>
</ul>

<ol>
   <li>Item 1</li>
   <li>Item 2</li>
</ol>
  1. Div and Span Tags: These tags are used to group and style elements on a web page.
<div>
   <h1>Header inside a div tag</h1>
   <p>Paragraph inside a div tag</p>
</div>

<p>This <span style="color: red;">word</span> is highlighted using a span tag.</p>

In addition to tags, HTML also supports attributes that provide additional information about the tag. Here are some examples:

  1. Class Attribute: This attribute is used to specify one or more classes for an HTML element, which can be used to apply CSS styles to that element.
<p class="my-class">This paragraph has a custom class applied to it.</p>
  1. ID Attribute: This attribute is used to specify a unique identifier for an HTML element, which can be used to target that element with CSS or JavaScript.
<div id="my-div">This div has a unique ID applied to it.</div>
  1. Style Attribute: This attribute is used to specify inline CSS styles for an HTML element.
<p style="color: red;">This paragraph has red text.</p>

These are just a few examples of HTML tags and attributes. As you learn more about HTML, you’ll become familiar with many more tags and attributes, as well as more complex structures like forms, tables, and more.

Also check WHAT IS GIT ? It’s Easy If You Do It Smart

You can also visite the Git website (https://git-scm.com/)

One Response

Leave a Reply

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