HTML Data Types, Attributes and entities

0 84

Data Types Attributes and entities in HTML

in this tutorial you will learn about Data Types Attributes and entities in HTML

What is data types in HTML

A data type specifies that which type value assigned to the attribute and what type of content that is to be displayed on your HTML web page.the different type of content there in HTML web page in case of text images hyperlink video and types in HTML help us to identify the type of formatting such as color and length of data.

important basic data types are.

Text Strings

Text Strings Specifies textual content of HTML web page which is readable by the user.

Uniform Resource Identifiers (URIs)

Uniform Resource Identifiers (URIs) Specifies the location of Web pages or network files.


Color data type specify the color to be applied HTML content.


Length data type specifies spacing among HTML elements. in HTML document length value can be in pixel,length,or multilength.

Content Types

Content data type specifies that which type content to be displayed on HTML web page. Examples of content types include “text/html” for displaying text using HTML format, “image/gif” for displaying image of a .gif format, and “video/mpg” for displaying a video file of .mpg format.

HTML Attributes

What is HTML Attributes

HTML attributes help to provide some meaning to the elements in other words attributes are name/value pairs that describe the element and its content format. Attributes are always added in start tag Some of the global attributes are…



Class attribute specifies class name of your HTML element, class attribute will assign more subtype, these subtypes can be used later in CSS for styling your HTML content or with javascript to change or add behavior etc.



This attribute will specify content menu for HTML element. The context menu will appear that time when a user right click on the element

dir attribute

dir attribute specifies the direction of the text present for the element.dir attribute used for drop and drag element function, in HTML images and links are draggable by default.

dropzone attribute

dropzone attribute will specify whether that dragged data link, copied, or moved when its dropped.


Through style attribute, you can give inline style to your element.


title attribute provides extra information about the element.

lang attribute

In HTML document language can be declared in <html> tag using lang attribute.

href attribute

In HTML links are defined with the <a> tag to specify link address href attribute used.

Size Attribute

In elements u can set your image/movie height and width, size attributes are available in height and width.

alt Attribute

Through alt attribute can define alternative text in cause when your required element can’t be displayed.

HTML entities

Reserved characters replaced with character entities in html, if you want to use the less then (<) and greater then (>) signs in your html text ,might be browser will mix them with tags o in html character entities are always used to display reserved character in the html document.

If want to display less sign then have to write like this < or (>)

Some entities are follows which are commonly used in html.

Output Description Entity Name Entity Number
non-breaking space &nbsp; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
euro &euro; &#8364;
© copyright &copy; &#169;
¢ cent &cent; &#162;
¥ yen &yen; &#165;
® registered trademark &reg; &#174;



Leave A Reply

Your email address will not be published.