HTML Elements

HTML Elements are represented by the tags, which can have attributes that provide additional information about the elements. Elements allows browsers to render the text, images, links and other media.

Syntax:

<tag>Some Content</tag>

Explanation: The HTML element is everything from the start tag to the closing tag.

Example:

<p> Nepal Coding School </p>

Explanation:

<p> is the starting tag.
Nepal Coding School is the content.
</p> is the closing tag.

Common HTML Elements

1. Headings: It is denoted by <h1> tag which defines the different levels of heading.

<h1>Nepal Coding School</h1>
<h2>Subheading</h2>

2. Paragraphs: It is denoted by <p> tag which defines the block of text.

<p>Learn Coding With Nepal Coding School </p>

3. Links: A link is denoted by <a> tag which is used to create hyperlinks to other pages or resources.

<a href="https://www.example.com">Visit Example</a>

4. Images: Is it denoted by <img> tag which is used to embed images in a webpages

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

5. Tables: It is Denoted by <table> tag which is used to display a tabular data

<table>
    <tr>
        <th>Header 1</th>
        <th>Header 2</th>
    </tr>
    <tr>
        <td>Data 1</td>
        <td>Data 2</td>
    </tr>
</table>

Semantic HTML Elements

Semantic HTML elements provide the meaning to the content. Which make easier for search engine and other tools to understand the structure of webpage.

Example:

  • <header>: Define a header of a document or section
  • <nav>:  Define a set of navigation links or url
  • <article>: Define an independent self contained content
  • <section>:  Define a section in a document
  • <footer>: Define a footer of an document
Share this Tutorials

HTML Elements

Or copy link

CONTENTS
Scroll to Top