Sunday 16 February 2014

HTML Elements

HTML documents are defined by HTML elements.An HTML element is everything from the start tag to the end tag:

HTML Element Syntax

  • An HTML element starts with a start tag  /opening tag
  • An HTML element ends with an end tag  / closing tag
  • The element content is everything between the start and the end tag
  • Some HTML elements have empty content
  • Empty elements are closed in the start tag
  • Most HTML elements can have attributes.

 


Example Explained

  • The DOCTYPE declaration defines the document type
  • The text between <html> and </html> describes the web page
  • The text between <body> and </body> is the visible page content
  • The text between <h1> and </h1> is displayed as a heading
  • The text between <p> and </p> is displayed as a paragraph.

HTML Introduction

What is HTML?

HTML is a language for describing web pages and more effective use in HTML.

  • HTML stands for Hyper Text Markup Language
  • HTML is a markup language
  • A markup language is a set of markup tags
  • The tags describe document content
  • HTML documents contain HTML tags and plain text
  • HTML documents are also called web pages

  Basic Example:-

<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

Ans:-

My First Heading

My first paragraph