Home HTML Tutorial for beginners 3 HTML Elements

3 HTML Elements

66
0

HTML documents are made up of HTML elements.

Most HTML elements are written using a start tag and an end tag, and the content in between. Start tag also known as open tag may contain attributes as shown in figure to enhance its properties.

Attributes specify additional properties of the element such as id, class, height, width, color etc. Attributes normally presented as name = value.  Some attributes also presented without value.

But some HTML elements do not have closing tags and are known as empty elements or void elements. Examples of empty elements are : <br/>, <hr/> etc. we will discuss in detail about them later.

Difference between TAG and ELEMENT

Technically HTML element means opening tag, closing tag, attributes and everything between opening and closing tags. and HTML Tag means either opening or closing tag. But in practical field or real life we are saying tag and element to specify the same thing HTML element for the shake of simplicity.

Points to Remember :

  1. HTML tags are not case sensitive. Means we can use either uppercase or lowercase or a combination of both while writing HTML tags.
  2. HTML attribute values are case sensitive.
  3. We can nest HTML elements. Means one HTML element can be written between opening and closing tag of another HTML element.

Types of HTML Elements

As per layout the HTML elements can be classified block level and inline elements.

Block level elements : These elements displays with line breaks. For example – h1, form, li, ol, ul, p, pre, table, div etc.

Inline Elements : These elements are normally displayed without line breaks. For example – b, a, strong, img,

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here