Difference between GET and POST method :
- GET Method have some limit like only 2Kb data able to send for
request, but in POST method unlimited data can we send.
- On using GET method, the data transfered to the requested page via url but
Not in POST method so POST method is good for sending sensitive data like user-name or password of a user.
- Get request can be cached but POST request can never be cached.
- Get request can be Bookmarked but POST request can not be bookmarked.
A cookie can store data up to the size of 4096 bytes i.e is 4Kb, the limit of cookie per domain is 20 cookies.
SGML (Standard generalized markup language) is a standard which tells how to specify document markup. It’s only a Meta language which describes how a document markup should be.
HTML is a markup language which is described using SGML.
So, by SGML they created DTD (Document Type Definition) which the HTML refers and needs to adhere to the same. So you will always find “DOCTYPE” attribute at the top of HTML page which defines which DTD is used for parsing purpose.
Now parsing SGML was a pain so they created XML to make things better. XML uses SGML. For example in SGML you have to start and end tags but in XML you can have closing tags which close automatically (“”).
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
XHTML was created from XML which was used in HTML 4.0. So for example in SGML derived HTML “
” is not valid but in XHTML it’s valid. You can refer XML DTD as shown in the below code snippet.
In short SGML is the parent of every one. Older HTML utilizes SGML and HTML 4.0 uses XHTML which derived from XML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
iframe is used to display a web page within a web page.
<title>My Home Page</title>
<h1> Use of Iframe. </h1>
<iframe src="www.google.com" ></iframe>
DTD is Document Type Definition. The purpose of a DTD is to define the legal building blocks of an XML document. A DTD defines the document structure with a list of legal elements and attributes.
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
.htm are used as an extension to save a HTML file.
- To store information usually relevant to browsers and search engines.
id selector uses the id attribute of an HTML tag to find the specific element. An id should be unique within a page, so you should use the id selector when you want to find a single, unique element.To find an element with a specific id, write a hash character, followed by the id of the element.
<div id="head"> My Heading inside div </div>
class selector finds elements with the specific class. The class selector uses the HTML class attribute.To find elements with a specific class, write a period character ( . ), followed by the name of the class.
<div class="head"> My Heading inside div </div>
You can add the background music in your web page by following way:
- If You want to play it once then use the below code.
<bgsound src="bgmusic.mid" loop="1">
- If You want to play it continuously, then change the number in loop to a higher value in above example, say
loop=100 or loop="infinite".
- If you needs this to work with Netscape and Internet Explorer, or other older browser you can use the embed tag to implement music to your page using code similar to the example below.
<embed src="music.mid" Autostart=TRUE height=60 width=145 loop=true>
background property of the
body tag and set the image URL in their.
<h1> Setting background image </h1>