DEV Community

MANOJ K
MANOJ K

Posted on

HTML::

HTML Tags

What they are:

  • Special keywords enclosed in angle brackets (< >) that tell the browser how to interpret content.

How they work:

- Usually come in pairs:
  - Opening tag  <p>
  - Closing tag  </p>
- Closing tags always start with a forward slash /.

Enter fullscreen mode Exit fullscreen mode

Purpose:

  • Mark the start and end points of an element.

HTML Elements

What they are:

  • A complete structure that includes the opening tag, the content inside it, and the closing tag.

How they work:

  • Start tag + Content + End tag = Element

Purpose:

  • Elements are the actual building blocks of a webpage.

Example:

<p>This is a paragraph.</p>


-  <p> → opening tag
-  This is a paragraph. → content
-  </p> → closing tag
-  Together, they form a paragraph element.

Enter fullscreen mode Exit fullscreen mode

Reference:
https://www.tutorialspoint.com/html/html_elements.html
https://www.w3schools.com/html/html_elements.asp

Top comments (0)