HTML Elements (JNNC Technologies)


HTML documents are text files and this is defined by HTML elements.


Elements

Start tagElement contentEnd tag
<p>This is a paragraph</p>
<a href=”index.html”>This is a link</a>
<br>Inserts a single line break.
<strong>Bold Text</strong>

HTML Tags

  • HTML tags are used to mark-up HTML elements.
  • HTML tags are surrounded by the two characters < and >
  • The surrounding characters are called angle brackets.
  • HTML tags normally come in pairs like <b> and </b>
  • The start tag is often called the opening tag. The end tag is often called the closing tag.
  • The first tag in a pair is the start tag; the second tag is the end tag.
  • The text between the start and end tags is the element content.
  • HTML tags are not case sensitive; <strong> means the same as <STRONG>

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>Run 
Explanation:
  • The <!DOCTYPE html> declaration specifying document is using HTML 5
  • The <html> element is main initial element of an HTML document
  • The content between <head> and </head> are the meta information about an HTML document
  • The <title> element used to specifies a title for an HTML document
  • The content between <body> and </body> tag is the visible page content
  • The <h1> element is an large heading of webpage
  • The <p> element is an paragraph text
  • The purpose of the <strong> tag is to define an HTML element that should be displayed as bold.

0 Comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();