HTML 5 Interview Questions and Answers (188) - Page 2

What is the marquee property for text to move from bottom to upside

apply : direction="up" property to move from bottom to upside !!
How do u manage the speed of <marquee> ??

with the use of : scrollamount peoperty !!
low means less and high means more speed !!
What is the use of page-break-after?

To Break (start new page) the page after the element. this is basically used while printing a form etc.
syntax:
<div style="page-break-after:always;">Lakhan Pal Garg </div>
<div>My Blog name is : http://lakhangarg.blogspot.com </div>

Out put will be as :
Lakhan Pal Garg (First Page)
My Blog name is : http://lakhangarg.blogspot.com (Second Page)
What is the use of page-break-before

To Break (start new page) the page before the element. this is basically used while printing a form etc.
syntax:
<div>Lakhan Pal Garg </div>
<div style="page-break-before:always;">My Blog name is : http://lakhangarg.blogspot.com </div>

Out put will be as :
Lakhan Pal Garg (First Page)
My Blog name is : http://lakhangarg.blogspot.com (Second Page)
what to do when my Flash Object or Flash Embed is coming over the other controls like drop down menus.

To avoid hiding the Menus by the Flash objects we can use WMODE property with EMBED Tag.
We need to Setwmode=transparent

For that we also need to at WMODE parameter with Object Tag.

Below is one Sample Example :
In Object Tag, we need to write
param name="wmode" value="transparent"
and with Embed Tag, we need to write wmode="transparent"

We can also use :
<param name="wmode" value="opaque" /> with object parameters.

You can Check this link as Reference :
http://kb2.adobe.com/cps/142/tn_14201.html

Modified By :
Moderator3
What are differences between HTML and DHTML?

HTML
1. It is referred as a static HTML and static in nature.
2.A plain page without any styles and Scripts called as HTML.
3.HTML sites will be slow upon client-side technologies.



DHTML
1.It is referred as a dynamic HTML and dynamic in nature.
2.A page with HTML, CSS, DOM and Scripts called as DHTML.
3.DHTML sites will be fast enough upon client-side technologies.
What is the difference between <% %>, <%= %>, <%# %>?

• The codes written in <% %> can be treated as server side code in script languages.

• The code written in <%= %> is used for accessing any server side variable into the HTML (in .aspx) page.

• The code written in <%# %> is for the binding control like repeater, gridview etc. Basically this is used to bind the particular column with the database value when the Autogenerate column of the binding control is false.
Can we have two body tags on a .html page?

Yes, we can have 2 body tags on a .html page
example:
<html>

<body bgColor="lightblue">
<h1>First</h1>
</body>
<body bgColor="lightgreen">
<h1>second</h1>
</body>
</html>



//output: the backcolor of the body will be lightblue,
//but the headers of both the body tags will be visible in the output.
what are the different types of storage in HTML 5?

HTML5 offers two new objects for storing data on the client:

LocalStorage - stores data with no time limit

<script type="text/javascript">

localStorage.lastname="Smith";
document.write(localStorage.lastname);
</script>


SessionStorage - stores data for one session.The data is deleted when the user closes the browser window.

<script type="text/javascript">

sessionStorage.lastname="Smith";
document.write(sessionStorage.lastname);
</script>


details on TechFundaHowTo : www.Techfunda.com
Difference between XML and HTML.

-Both XML and HTML are based on SGML – Standard Generalized Markup Language

Different goals
- XML was designed to describe data and to focus on what data is
- HTML was designed to display data and to focus on how data looks
- XML fundamentally separates content (data and language) from presentation; HTML specifies the presentation

- HTML explicitly defines a set of legal tags as well as grammar (intended meaning)
<Table>….</Table>

- XML allows any tags or grammar to be used hence eXtensible
<Book>….</Book>
What are the header (<head>) section changes in HTML5 ?

Basically below are the two changes in HTML5 head section "

1) Removed "http-equiv="Content-Type" content="text/html; " attribute if the http-equiv="Content-Type" attributes form the META charset tag .

In Earlier version of HTML : charset meta tag is like given below
<meta http-equiv="Content-Type" content="text/html;  content="text/html; charset=utf-8" />


In HTML5
< meta charset="utf-8" />


2 ) No More Types for Scripts and Links

In Earlier version of HTML:

<link rel="stylesheet" href="~\stylesheet.css" type="text/css" />

< script type="text/javascript" src="~\script.js" />


In Html5 : No need to import type="text/css" in case of CSS and type="text/javascript" in JavaScript

< link rel="stylesheet" href="~\stylesheet.css" / >  

< script src="~\script.js" / >

In HTML 5, what is the declaration of the doctype ?

<!DOCTYPE html>


The above declaration tells the browser that the version of the html is 5.

In the previous version of the html that is 4.0. We used to write the doctype as :-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


In HTML 5, we don't need to write lengthy doctype declaration similar to html 4.


Thanks and Regards
Akiii
What is SPA ?

Single Page application(SPA) is a web application or web site that fits on a single web page which provides a more fluid UX akin to a desktop application by loading all necessary code (using HTML, JavaScript, and CSS) with single page Load.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories