HTML Elements

0
623

Text files are HTML documents which are defined by HTML elements.

Start Tag Content End Tag
<p> This is paragraph content. </p>
<h1> This is heading content. </h1>
<div> This is division content. </div>
<hr>

HTML Tags

  • To markup HTML elements HTML tags are used.
  • The two characters < and > surrounds HTML Tags
  • Angle Brackets are the surrounding characters.
  • In pairs like <u> and <u> HTML tags are used normally
  • The opening tag is also called start tag and the closing tag is also called end tag.
  • In a pair start tag is the first tag and end tag is second tag.
  • The element content is the text between the start and end tags.
  • The tags used in HTML are not case sensitive: <b> means <B>.

HTML Document Example

Example


<!DOCTYPE html>

<html>

<head>

<title>Title of Page</title>

</head>

<body>

<h2>This is page heading.</h2>

<p>This is first <strong>paragraph text</strong>.</p>

</body>

</html>


Explanation

  • HTML 5 is used by the <! DOCTYPE html> which is declaration specifying document.
  • The main initial element of an HTML document is the <html> element
  • The meta information about an HTML document is the content between <head> and </head>
  • To specify a title for an HTML document the <title> element is used.
  • The visible page content is the content between <body> and </body> tag.
  • A large heading of webpage is the <h1> element.
  • A paragraph text is the <p> element
  • To define an HTML element which can be displayed as bold <strong> tag is used.

—————————————————————————————————————————————

HTML Basic Tags

HTML documents are created by HTML tags and their attributes so that you can view in browsers.

To quickly find the tag you are searching for the HTML tags are listed alphabetically.

DTD: It indicates that the tag is allowed in which version of HTML. S=Strict, T=Transitional, and F=Frameset.

SHARE
Previous articleHTML Attributes
Next articleHTML 5 DataList