Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2017
    Posts
    153

    Smile What is the basic difference between HTML elements and tags?

    What is the basic difference between HTML elements and tags?

  2. #2
    Senior Member
    Join Date
    Apr 2015
    Posts
    134
    An element in HTML represents some kind of structure or semantics and generally consists of a start tag, content, and an end tag.

    Tags are used to mark up the start and end of an HTML element.

  3. #3
    Registered User erieki's Avatar
    Join Date
    Jun 2017
    Posts
    135
    A tag is a part of an HTML element, or rather, an element is the sum of a start-tag, optional content and optional end-tag.

    e.g. The 'header' element is made up of the following:
    <header> <-- Start tag of the 'header' element.
    Text content, and other elements
    </header> <-- Closing tag of the 'header' element.

    Some elements like <br> don't need a closing tag (if the document is not intended to be XML-compliant) or text content.

    Elements and their corresponding start tags can have attributes.
    e.g. <img src="/opengraph.png" alt="">
    In the above example, the 'img' element has two attributes in its start-tag: src and alt. The 'img' element doesn't have any contents and a closing-tag is not required in HTML5.

  4. #4
    Registered User
    Join Date
    Jan 2013
    Location
    India
    Posts
    54
    A tag is a subset of element in HTML. An element is the basic building block of HTML and is typically made up of two tags: an opening tag and a closing tag.

    For example, the paragraph element <p></p> is made up of the opening tag <p> and the closing tag </p>. The element is the collection of both the starting tag and the ending tag.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.