HTML Interview Questions - 6


1.What is difference between HTML form methods GET and POST?
GET & POST are methods of <form>, these method specify how data can be sent.
GET Method
1. Adds form-data into URL in place of name or value pairs
2. Never use GET when sending confidential information, it gets visible in URL
POST Method
1. Unlike GET data is not shown in URL, it adds form-data into body of the HTTP request
2.How to add video using HTML5?
Before video was added using a plugin, now using <video> tag it can be done.
<!DOCTYPE html>
<html>
<body>
<video width=”320″ height=”240″ controls>
<source src=”movie.mp4″ type=”video/mp4″>
<source src=”movie.ogg” type=”video/ogg”>
Your browser does not support the video tag.
</video>
</body>
</html>
3.How to add audio to HTML5?
Like video even audio used to be played using plugins but now you can do it in HTML5 using <audio> tag.
<html>
<body>
<audio controls>
<source src=”horse.ogg” type=”audio/ogg”>
<source src=”horse.mp3″ type=”audio/mpeg”>
Your browser does not support the audio element.
</audio>
</body>
</html>
4.Tell the usage of localStorage in HTML5?
Data in HTML5 is not passed on by every server request, like it was before with cookies. But passed only when asked using localStorage.
So, localStorage is used to call data when needed. Here is the sample
localStorage.lastname=”Smith”;
document.getElementById(“result”).innerHTML=”Last name: ”
+ localStorage.lastname;
5.Any element can be dragged in HTML5, here`s an example using drag, drop functions.
<html>
<head>
<style type=”text/css”>
#div1 {width:350px;height:70px;padding:10px;border:1px solid #aaaaaa;}
</style>
<script>
function allowDrop(ev)
{
ev.preventDefault();
}
function drag(ev)
{
ev.dataTransfer.setData(“Text”,ev.target.id);
}
function drop(ev)
{
ev.preventDefault();
var data=ev.dataTransfer.getData(“Text”);
ev.target.appendChild(document.getElementById(data));
}
</script>
</head>
<body>
<p>Drag the W3Schools image into the rectangle:</p>
<div id=”div1″ ondrop=”drop(event)” ondragover=”allowDrop(event)”></div>
<br>
<img id=”drag1″ src=”img_logo.gif” draggable=”true” ondragstart=”drag(event)” width=”336″ height=”69″>
</body>
</html>
6.Tell about sessionStorage Object in HTML5.
It`s same like localStorage but only difference is that this Object is destroyed as soon as user closes the browser. It`s until one session. Here is the example.
<script>
function clickCounter()
{
if(typeof(Storage)!==”undefined”)
{
if (sessionStorage.clickcount)
{
sessionStorage.clickcount=Number(sessionStorage.clickcount)+1;
}
else
{
sessionStorage.clickcount=1;
}
document.getElementById(“result”).innerHTML=”You have clicked the button ” + sessionStorage.clickcount + ” time(s) in this session.”;
}
else
{
document.getElementById(“result”).innerHTML=”Sorry, your browser does not support web storage…”;
}
}
</script>
7.Write about Canvas element in HTML5?
<canvas> is just a container, to draw the graphics you need to use Javascript. Here is the example:
<canvas id=”myCanvas” width=”200″ height=”100″
style=”border:1px solid #000000;”>
</canvas>
8.What is polymorphism?
It`s an object oriented feature, definition goes like this – Polymorphism is objects ability to take form objects of different classes.
9.What is CSS?
CSS stands for Cascading Style Sheet, styles used to display a webapage are added in this sheet. This made lots of work easy. With changing this file total webpage design can be changed.
10.Difference between HTML5 Application cache and regular HTML browser cache?
HTML5 Application cache can prefetch pages that have not been visited at all by user thus increasing site performance. But in regular HTML this is not available.
11.Name different types of graphic types?
Raster graphics (pixels) and vector graphics (lines and curves).
12.What are new APIs added to HTML5 standard?
Here is the list
1. Application Cache API
2. DataTransfer API
3. Command API
4. Constraint Validation API
5. Text Track API
6. MediaController API
7. History API
13.HTML5 has many new features when compared to HTML, which helps to increase site performance and user experience on the site. Here are few advantages listing.
1. Mutuality
2. Improved Code
3. Improved Semantics
4. Elegant forms
5. Consistency
6. Fulfill  the need of Web application
7. Increase in site performance
8. Client side data base
14.What is SVG in HTML5?
SVG (Scalable Vector Graphics) is used to define vector based images on the webpage. Best thing about SVG graphics is that they don`t loose quality when you zoom them or resize them. Here is the sample code.
<html>
<body>
<svg xmlns=”http://www.w3.org/2000/svg” version=”1.1″ height=”190″>
<polygon points=”100,10 40,180 190,60 10,60 160,180″
style=”fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;”>
</svg>
</body>
</html>
15.Tell about Geolocation in HTML5?
It is used to locate user`s current position using getCurrentPosition(). Here is the sample.
<script>
var x=document.getElementById(“demo”);
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML=”Geolocation is not supported by this browser.”;}
}
function showPosition(position)
{
x.innerHTML=”Latitude: ” + position.coords.latitude +
“<br>Longitude: ” + position.coords.longitude;
}
</script>
16.What is the difference between HTML and HTML5 ?
HTML5 is the new HTML standard with new elements, audio, video support, 2D, 3D graphics, local storage and many other features. This reduces the usage of external plugins in the site.
17.Give the definition of HTML tag?
A HTML tag is nothing but a element which tells browser to execute it, when it gets loads. It`s same as functions in C.
18.Is it necessary to use <! DOCTYPE> in HTML5 ?
<! DOCTYPE> is nothing but an instruction to web browser about the version of current HTML page. Unlike other HTML tags <! DOCTYPE> doesnot have an end tag.
To be clear it`s not important to add <!DOCTYPE> in HTML5. And the reason is, all <! DOCTYPE > declarations require a reference to a Document Type Definition, because HTML 4.01 was based on Standard Generalized Markup Language (SGML). But HTML5 is not based on SGML, so it`s not required.
19.Can we use input type attribute in HTML5?
Yes, we can use input type attributes in HTML5. Below are the list of input attributes.
20.List out the tags those are mostly used  in HTML?
<a href=”URL”>Link</a> – Used for linking another page.
<h1> – heading1 tag
<b> – Used for Bold
<img src=”imageurl”> – To insert a image
(Q) What is the difference between html and xhtml?
21.Who is making the Web standards?
The World Wide Web Consortium (w3c Consortium)
22.Write a background color in HTML?
<body style=”background-color:yellow”>
23.What is the correct HTML for creating a hyperlink with title?
<a href=http://thestudentdaily.com title=”thestudentdaily”>Thestudentdaily</a> Sample: TheStudentdaily.com (Over your mouse on this link)
24.How can we call the external style sheet in HTML for referring?
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
25.Why we use ‘clear ‘in HTML?
We use the clearance in HTML code for separating the content from one <div> content after floating the position of other<div> content.
26.How many types of graphics?
There are two types of graphics
Raster Graphics –pixels (photoshop)
Vector Graphics – Lines & Curves( Illustrator)
27.What is a Layer in photoshop?
Layer is a component which holds the object. Without affecting the other content, we can modify the object in it.
28.What is Gradient? How to apply gradient?
Gradient is a mixing of two or more colors.
29.What is DHTML?
DHTML is a combination of HTML, XHTML, Javascript, Jquery and CSS.
DHTML is a TERM describing the art of making dynamic and interactive web pages.
30.What is XML?
XML stands for extensible Markup Language.
XML is designed to transport and store data.
31.What is CSS?
CSS stands for Cascading Style Sheets
Styles define how to display HTML elements
Styles were added to HTML 4.0 to solve a problem
External Style Sheets can save a lot of work
External Style Sheets are stored in CSS files
32.What is HTML5?
HTML5 will be the new standard for HTML, XHTML, and the HTML DOM.
HTML5 is still a work in progress. However, most modern browsers have some HTML5 support.
33.Are HTML tags case sensitive?
No HTML tags are not case sensitive.
34.What is most used email form script?
PHP
35.Which operator used to convert 00110011 into 11001100?
~ operator is used convert 00110011 into 11001100.
36.What the use of Canvas Element in HTML5
The canvas element is used to draw graphics images on a web page by using javascript like below
<canvas id=”pcdsCanvas” width=”500″ height=”400″></canvas> <script type=”text/javascript”>
var pcdsCanvas=document.getElementById(“pcdsCanvas”);
var pcdsText=pcdsCanvas.getContext(“2d”);
pcdsText.fillStyle=”#82345c”;
pcdsText.fillRect(0,0,150,75);
</script>
37.What is the use of localStorage in HTML5 ?
Before HTML5 LocalStores was done with cookies. Cookies are not very good for large amounts of data, because they are
passed on by every request to the server, so it was very slow and in-effective.
In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. It is possible to store
large amounts of data without affecting the website’s performance.and The data is stored in different areas for different
websites, and a website can only access data stored by itself.
And for creating localstores just need to call localStorage object like below we are storing name and address
<script type=”text/javascript”>
localStorage.name=”PCDS”;
document.write(localStorage.name);
</script>
<script type=”text/javascript”>
localStorage.address=”Mumbai India..”;
document.write(localStorage.address);
</script>
38.What is the sessionStorage Object in html5 ? How to create and access ?
The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window.
like below we can create and access a sessionStorage here we created “name” as session
<script type=”text/javascript”>
sessionStorage.name=”PCDS”;
document.write(sessionStorage.name);
</script>
39. Which Browsers support HTML 5 or Browser compatability of HTML 5?
HTML5 is not yet an official standard, and no browsers have full HTML5 support.
But all major browsers (Safari, Chrome, Firefox, Opera, Internet Explorer) continue to add new HTML5 features to their latest versions.
40.What is HTML5 Web Storage?
In HTML5, we can store data locally within the user’s browser.It is possible to store large amounts of data without affecting the website’s performance.
Web Storage is more secure and faster.
there are two types of Web Storages
1.LocalStorage:stores data locally with no limit
2.SessionStorage:stores data for one session
41.How to store data on client in HTML5?
we can store data using HTML5 Web Storage.
1.LocalStorage
<script type=”text/javascript”>
localStorage.name=”Raj”;
document.write(localStorage.name);
</script>
2.SessionStorage
<script type=”text/javascript”>
sessionStorage.email=”test@gmail.com”;
document.write(sessionStorage.email);
</script>
42.How do you play a Video using HTML5?
HTML5 defines a new element to embed a video on Web Page
the <video> element.
Example:
<video width=”500″ height=”300″ controls>
<source src=”video1.mp4″ type=”video/mp4″>
</video>
43.How do you play a Audio using HTML5?
HTML5 defines a new element to embed a video on Web Page
the <audio> element.
Example:
<audio controls>
<source src=”audio.mp3″ type=”audio/mpeg”>
</audio>
44.Canvas Element in HTML5?
The canvas element is used to draw graphics images on a web page
<canvas id=”canvas_image” width=”400″ height=”200″></canvas>
The canvas is a two-dimensional grid.
45.What does a <hgroup> tag do?
The <hgroup> tag is used to group heading elements.
The <hgroup> element is used to group a set of <h1> to <h6> elements.
<hgroup>
<h1>Hello</h1>
<h2>How r u?</h2>
</hgroup>
46.Which video formats are used for the video element?
Internet Explorer 9+: MP4
Chrome 6+: MP4, WebM, Ogg
Firefox 3.6+ : WebM, Ogg
Safari 5+ : MP4,
Opera 10.6+ : WebM,Ogg
46.What is the <!DOCTYPE> ? Is it necessary to use in HTML5 ?
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag
47.WHAT are some other advantages of HTML5?
a) Cleaner markup than earlier versions of HTML
b) Additional semantics of new elements like <header>, <nav>, and <time>
c) New form input types and attributes that will (and in Opera’s case, do) take the hassle out of scripting forms.
48.What is the  <!DOCTYPE>? Is it mandatory to use in HTML5?
The <!DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. The <!DOCTYPE> tag does not have an end tag. It is not case sensitive.
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag.  As In HTML 4.01, all <! DOCTYPE > declarations require a reference to a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not based on SGML, and therefore does not require a reference to a Document Type Definition (DTD).
49.What is the major improvement with HTML5 in reference to Flash?
Flash is not supported by major mobile devices such as iPad, iPhone and universal android applications. Those mobile devices have lack of support for installing flash plugins. HTML5 is supported by all the devices, apps and browser including Apple and Android products. Compared to Flash, HTML5 is very secured and protected. That eliminates major concerns that we have seen with Flash.
50.What is the sessionStorage Object in html5 ? How you can create and access that?
The HTML5 sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. We can create and access a sessionStorage, created “name” as session
<script type=“text/javascript”>
sessionStorage.name=“DGTECH”;
document.write(sessionStorage.name);
</script>
51.Describe any two new features of HTML5.
HTML 5 comes up with many new features including video/audio elements for media playback and better support for local offline storage.
52.What does a <hgroup> tag do?
It is used for heading sections. Header tags used are from <h1> to <h6>. The largest is the main heading of the section, and the others are sub-headings.
53.WHAT OTHER ADVANTAGES DOES HTML5 HAVE?
a) Cleaner markup
b) Additional semantics of new elements like <header>, <nav>, and <time>
c) New form input types and attributes that will (and in Opera’s case, do) take the hassle out of scripting forms.
53. GIVE AN EXAMPLE OF NEW ELEMENTS IN HTML5 TO SUPPORT MULTIMEDIA AND GRAPHICS?
HTML5 introduced many elements such as , instead of
54.WHAT IS THE DIFFERENCE BETWEEN HTML5 APPLICATION CACHE AND REGULATE HTML BROWSER CACHE?
The new HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.
55.WHAT PURPOSE DOES HTML5 SERVE?
HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silver light, Apache Pivot, and Sun JavaFX.
56.WHAT IS THE STATUS OF THE DEVELOPMENT OF THE HTML 5 STANDARD?
HTML5 is being developed as the next major revision of HTML (HyperText Markup Language), the core markup language of the World Wide Web. The Web Hypertext Application Technology Working Group (WHATWG) started work on the specification in June 2004 under the name Web Applications 1.0.[1] As of March 2010[update], the specification is in the Draft Standard state at the WHATWG, and in Working Draft state at the W3C.
57.What is HTML5?
HTML5 is The New HTML Standard with new elements, attributes, and behaviors.
HTML 5 Features:
Ans :
1. The <canvas> element for 2D drawing
2. The <video> and <audio> elements for media playback
3. local storage support.
4. Added New elements, like <figure>,<small>, <header>, <nav>,<article>, <footer>, <section>,<mark>
5. New form controls, like placeholder,calendar, date, time, email, url, search,required ,autofocus
6. In HTML5 there is only one <!doctype> declaration: <!DOCTYPE html>
58.What is the <!DOCTYPE> ? Is it necessary to use in HTML5 ?
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag
58.What is the difference between HTMl5 Application cache and regular HTML browser cache?
HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.
59.Tell me What purpose does HTML5 serve?
HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silverlight, Apache Pivot, and Sun JavaFX.
60.Can you explain What the use of Canvas Element in HTML5?
The canvas element is used to draw graphics images on a web page by using javascript like below
<canvas id=“pcdsCanvas” width=“500? height=“400?>
</canvas>
<script type=“text/javascript”>
var pcdsCanvas=document.getElementById(“phpzagCanvas”);
var pcdsText=pcdsCanvas.getContext(“2d”);
pcdsText.fillStyle=“#82345c”;
pcdsText.fillRect(0,0,150,75);
</script>
61.Do you know What is the sessionStorage Object in html5? How to create and access?
The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. like below we can create and access a sessionStorage here we created “name” as session
<script type=“text/javascript”>
sessionStorage.name=“PHPZAG”;
document.write(sessionStorage.name);
</script>
62.Give the definition of HTML tag?
A HTML tag is nothing but a element which tells browser to execute it, when it gets loads. It`s same as functions in C.
63. Is it necessary to use <! DOCTYPE> in HTML5 ?
<! DOCTYPE> is nothing but an instruction to web browser about the version of current HTML page. Unlike other HTML tags <! DOCTYPE> doesnot have an end tag.
To be clear it`s not important to add <!DOCTYPE> in HTML5. And the reason is, all <! DOCTYPE > declarations require a reference to a Document Type Definition, because HTML 4.01 was based on Standard Generalized Markup Language (SGML). But HTML5 is not based on SGML, so it`s not required.
64.What is the status of the development of the HTML5 standard?
HTML5 is being developed as the next major revision of HTML (HyperText Markup Language), the core markup language of the World Wide Web. The Web Hypertext Application Technology Working Group (WHATWG) started work on the specification in June 2004 under the name Web Applications 1.0.[1] As of March 2010[update], the specification is in the Draft Standard state at the WHATWG, and in Working Draft state at the W3C.
65.What are the new APIs provided by the HTML 5 standard? Give a brief description of each.
The canvas element: Canvas consists of a drawable region defined in HTML code with height and width attributes. JavaScript code may access the area through a full set of drawing functions similar to other common 2D APIs, thus allowing for dynamically generated graphics. Some anticipated uses of the canvas include building graphs, animations, games, and image composition.
Drag-and-drop
Cross-document messaging
Browser history management
MIME type and protocol handler registration
Timed media playback
Offline storage database
Document editing
66.What purpose does HTML5 serve?
HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silverlight, Apache Pivot, and Sun JavaFX.
67.What other advantages does HTML5 have?
Cleaner markup
Standardized approach to mobile devices support
Additional semantics of new elements like <header>, <nav>, and <time>
New form input types and attributes that will (and in Opera’s case, do) take the hassle out of scripting forms.
68.What is the difference between HTMl5 Application cache and regulat HTML browser cache?
The new HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.
69.WHAT IS THE DIFFERENCE BETWEEN HTML5 APPLICATION CACHE AND REGULATE HTML BROWSER CACHE?
The new HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.
70.WHAT PURPOSE DOES HTML5 SERVE?
HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silver light, Apache Pivot, and Sun JavaFX.
71.WHAT IS THE STATUS OF THE DEVELOPMENT OF THE HTML 5 STANDARD?
HTML5 is being developed as the next major revision of HTML (HyperText Markup Language), the core markup language of the World Wide Web. The Web Hypertext Application Technology Working Group (WHATWG) started work on the specification in June 2004 under the name Web Applications 1.0.[1] As of March 2010[update], the specification is in the Draft Standard state at the WHATWG, and in Working Draft state at the W3C.
72. How do we make a comment inside the CSS file?
/* include your comment here*/
73. How can we make each word in a text start with a capital letter using CSS?
We can use this property   text-transform: capitalize;
74. What are? the main difference between css2 and css3?
The main and biggest difference between CSS2 and CSS3 is that CSS3 has been split up into different sections, called modules. Each of these modules is making it?s way through the W3C in various stages of the recommendation process.
75. What is the? grouping in CSS?
We can write style for two or more selectors that share the same style, only we need to comma separated list of every selector. Grouping is decrease number of line in our code.
76. What is difference between margin and padding in CSS ?
Below is the main difference between margin and padding…
Padding – defines space between border and element content
Margin – defines space between border and other outer elements
77.How can we call the external style sheet in HTML for referring?
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
78.How do we comment a CSS file?
/* include your comment here*/
79.How can we make each word in a text start with a capital letter?
With this one in css   —– text-transform: capitalize
80.Why we use ‘clear ‘in HTML?
We use the clearance in HTML code for separating the content from one <div> content after floating the position of other<div> content.
81.How many types of graphics?
There are two types of graphics
Raster Graphics –pixels (photoshop)
Vector Graphics – Lines & Curves( Illustrator)
82.What is a Layer in photoshop?
Layer is a component which holds the object. Without affecting the other content, we can modify the object in it.
83.What is Gradient? How to apply gradient?
Gradient is a mixing of two or more colors.
84.Who develops HTML?
W3C stands for World Wide Web Consortium.
85.We send and receive HTML file using which protocol?
HTTP .Where, HTTP stands for HYper Text Transfer Protocol.
86.Which sequence of HTML tags are correct?
<html><head><title></<title></head><body></body></html>
87.Which command we use to link a page with an HTML page?
<a href=”page.htm?phpMyAdmin=70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2″ ></a>
This command line will link the page.htm to that page where we use above command.
88.Which command used to create HTML Link?
<a href=”r4r.in?phpMyAdmin=70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2″>When press open R4R website</a> When we press on this highlight Text “When press open R4R website” than it will open r4r.in website.
89.What do you understand about DOCTYPE in HTML?
DOCTYPE is stands for Document Type Declaration.In an HTML every HTML document is started with DOCTYPE declaration.It may be differ for different versions of HTML.DOCTYPE is used only bySGML tools like as HTML validator.
Example of Document Type Declaration in HTML 4 are,<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
90.How Cell Padding is differ from Cell Spacing?
I have given you how cell padding is differ from cell spacing given below:
Cell Padding: Cell Padding in HTML: is used to define the how much space need b/n cell content and cell edges.
Syntax:
< table width=”200″ border=”1″ cellpadding=”3″>
means that it takes 3 pixels of padding inside the each cell.
Cell Spacing: It is also used to format the table.but it differ than cell padding because in cell padding we can set an extra space to seperate the cell content with cell edges.Where as we use cell spacing to set the space b/w the cells.
Syntax:
< table width=”200″ border=”1″ cellspacing=”10″>
We can use cell padding and cell spacing together like that,
< table width=”200″ border=”1″ cellpadding=”3″ cellspacing =�10�>
91.How you define index document?
Many times we have require index.htm / document because it is a standard for the host-server to look for the document and deploy it.Default document to be displayed in the web.
92.How you define HEAD in HTML?
Head is placed before the body in the HTML.It is use to display only the general information or unordered collection to information about the HTML document.
93. How you define SPAN in HTML?
We use SPAN by using <SPAN> tag in HTML.Syntax:<SPAN>…………</SPAN>Used to highlightthe any color text, for adding colored text, for adding background image to text. SPAN not a cause of line break. It delimits text and using them we can use style to the \’elemental\’ region without any break in Text.
Example:
p>
<span style=”color:#FF0000;”>
In this page we use span.
</span>
</p>
94.WHAT is the HTML?
HTML is hyper text markup language and used for static pages
95.What do you know about HTML tags?
HTML tags decided how HTML file is look like on web page.I have given you some basic information about HTML tags.
1.In HTML,every keyword should be surrounded with open and closed with angled brackets.
Example:<html>,<body>,<title>,<head> etc.
2.HTML tags are not case sensitive means that suppose if we open <Html> tags than we can closed this tag with <html>.
3.When we open an HTML tag it should we have to closed tag.Like: <a>….</a>
4.In the above point tag (<a>) is called the open tag.where as tag</a> is called the end tag.
Example:
<head>
<body>
…..
…..
</body>
</head>
96.What are basic HTML tags how we use them?
I have shown you some basic HTML tags with their example:
1.Heading<h1…h6>:Range of HTML headings is from h1 to h6.When we go h1 to h6 its headings become larger and bold.
Example:
<h1>Write HTML heading between those tags</h1>
<h2>Write HTML heading between those tags</h2>
……..
……..
<h6>Write HTML heading between those tags</h6>
2.Paragraph<p>…</p>:We write paragraph in HTML by using <p>…..</p> tag.
Example:
<p>Write here a paragraph</p>
3.Link:Using this we can link our HTML file with some other files.
Example:
<a href=”http://www.R4R.co.in”></a>
4.Image:It is used to describe the image in HTML.
<img src=”welcome.gif” width=”200″ height=”75″ />
97.Can we write a comment into the HTML?
Yes,HTML provide us facility to write comments on HTML file.Comments that we write on HTML file are ignored by the browser so it will not display on browser.
Syntax:
<!– Here write your comment –>
Example:
<html>
<body>
<!–Which you here not will diplayed on browser–>
<p>R4R Welcomes You!</p>
</body>
</html>
output:
R4R Welcomes You!
98.How to use Line Break  and Horizontal Line tags in HTML?
In HTML we use <br /> to break the line without started any new paragraph.
Syntax:
<br />
In HTML <br /> has no end tag.
Example:
<p>Hello<br />client<br />R4R Welcomes You!</p>
output:
Hello
client
R4R Welcomes You!
For creating horizontal line we use <hr /> in HTML.
Syntax:
<hr />
Example:
<p>This is upper level</p>
<hr />
<p>This is middle level</p>
<hr />
<p>This is bottom level</p>
Both <br /> and <hr /> called as empty tags. Because their is no end tag for them.
99.What do you understand about DOCTYPE in HTML?
DOCTYPE is stands for Document Type Declaration.In an HTML every HTML document is started with DOCTYPE declaration.It may be differ for different versions of HTML.DOCTYPE is used only bySGML tools like as HTML validator.
Example of Document Type Declaration in HTML 4 are,
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
100.How Cell Padding is differ from Cell Spacing?
I have given you how cell padding is differ from cell spacing given below:
Cell Padding: Cell Padding in HTML: is used to define the how much space need b/n cell content and cell edges.
Syntax:
< table width=”200″ border=”1″ cellpadding=”3″>
means that it takes 3 pixels of padding inside the each cell.
Cell Spacing: It is also used to format the table.but it differ than cell padding because in cell padding we can set an extra space to seperate the cell content with cell edges.Where as we use cell spacing to set the space b/w the cells.
Syntax:
< table width=”200″ border=”1″ cellspacing=”10″>
We can use cell padding and cell spacing together like that,
< table width=”200″ border=”1″ cellpadding=”3″ cellspacing =�10�>
101.How you define index document?
Many times we have require index.htm / document because it is a standard for the host-server to look for the document and deploy it.Default document to be displayed in the web.
102.How you define HEAD in HTML?
Head is placed before the body in the HTML.It is use to display only the general information or unordered collection to information about the HTML document.
103.How you define SPAN in HTML?
We use SPAN by using <SPAN> tag in HTML.Syntax:<SPAN>…………</SPAN>Used to highlightthe any color text, for adding colored text, for adding background image to text. SPAN not a cause of line break. It delimits text and using them we can use style to the \’elemental\’ region without any break in Text.
Example:
p>
<span style=”color:#FF0000;”>
In this page we use span.
</span>
</p>

No comments:

Post a Comment