What is an Element in HTML

Element in HTML
  • An Hypertext Markup Language(HTML) element contains tags ,content and attribute.
  • There are different types of HTML elements.
    • Normal elements
    • Raw text elements
    • Void elements.

Normal elements

  • The elements usually have both a start tag and an end tag known as Normal elements.

Raw text elements

  • The element must not contain other elements known as raw text elements.
  • It is also known as text or text-only elements.
  • Example  <title> element must not contain other elements (including markup of text), only plain text.

Void elements

  • The element no need to close tag is known as Void elements.
  • It is also known as empty elements or single elements or standalone
    elements.
  • Example <br />,<hr/> etc.

What is tag in html

  • HTML tags are like keywords define that how a web browser will format and display the
    content.
  • HTML tags contain three main parts: an opening tag, content, and closing tag.

Syntex:    <tagname>content goes here…</tagname>

HTML Documents

  • <!DOCTYPE html> All HTML documents must start with a unique document type declaration.

  • The HTML document starts with <html> and end with </html>.
  • <body> and </body> is the visible part of the HTML document (content).
  • <head> and </head> is element contains meta information about the document like <title> tag. 
  • <title> and </title> is used for title of the html page.
First Program in HTML
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

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

</body>
</html>

Output

Page Title

This is a Heading

This is a paragraph.

What is HTML
  • HTML is the standard  for Hypertext Markup Language for Web pages.
  • The HTML elements tell the browser ...
    Click Here
Previous topic next topic What is an Element in HTML
  • An Hypertext Markup Language(HTML) element ...
    Click Here
Previous topic next topic HTML Headings
  • The HTML headings are used to define the heading ...
    Click Here
Previous topic next topic HTML Formatting Elements
  • The <b>  element is use for bold text, without ...
    Click Here
Previous topic next topic HTML Comments
  • The HTML Comment are describe the extra feature about ...
    Click Here
Previous topic next topic HTML Attributes
  • Every HTML element can have attributes.
  • The HTML Attribute ...
    Click Here
Previous topic next topic HTML Images
  • The <img> tag is empty
Note: The empty ...
Click Here
Previous topic next topic HTML Links
  • HTML links are hyperlinks.
  • HTML link default color is ...
    Click Here
Previous topic next topic HTML Table
  • An HTML table is defined with the <table> tag.
  • ...
    Click Here
Previous topic next topic Table Backgrounds You can set the table background using one of the ...
Click Here
Previous topic next topic Table Header, tbody and Footer
  • Tables are categories into three parts: ...
    Click Here
Previous topic next topic Basic to Advance table design in HTML Example 1 <!DOCTYPE> <html> <body> ...
Click Here
Previous topic next topic HTML div tag
  • The <div>  element is used for style blocks ...
    Click Here
Previous topic next topic HTML Lists
  • The list is the way to present the data ...
    Click Here
Previous topic next topic HTML Form
  • The HTML <form> element is used to collect user ...
    Click Here
English Hindi