answersLogoWhite

0

📱

Web Programming

Web Programming is the category for programming for the Internet and World Wide Web. Q&A's include coding in technologies used for Browser, applet based applications, and more.

584 Questions

What happens with tags that don't have a closing tag?

Tags that do not have a closing tag will probably not render. If it's somthing like the <html> tag or the <body> tag, the whole web page may not work.

What is the full form of XHTML?

XHTML stands for eXtensible HyperText Markup Language.

How do you make a pop-up window from HTML code?

You cannot create a popup using HTML. You need to use a bit of programming code, like a scripting language and build that into the web page. The alert command in Javascript or the prompt command for example, can do it. There are lots of ways in different languages.

What are absolute links?

In web context, absolute links are those that have a full URI in the href attribute, for example: absolute link to this answer Relative links specifies the address relatively to the current page. Since all other pages on this site share the same "root", you can specify their href attribute without the http://wiki.answers.com/Q/ part: relative link to this answer

What is the different between XML and HTML?

HTML is a language used to build web pages. XML is a set of standards used to create other languages.

HTML is a markup language defined by the World Wide Web Consortium (W3C) and primarily used to code web-pages. HTML gives a group of pre-defined tags, like <BODY> and <A> and <LINK> that have well-defined uses and generally accepted default styles in modern browsers.

XML isn't a language at all. Rather, it's a particular syntax for setting up a language. It creates that idea of an element, and give those elements content and attributes. XML allows a programmer to create a language that is defined to specifically suit her needs. This is done one of several ways, but the most popular are by creating a Document Type Definition or an XML Schema. These documents define the behavior of the language itself.

HTML and XML are combined in the ubiquitous XHTML 1.0 and 1.1 specifications from the W3C. XHTML is being supplanted by HTML 5. HTML 5, by default, isn't an XML based language, but you can use XML-style code by changing the MIME type to application/html+xml.

A second version of XHTML was in the works at the W3C, but work stopped in December of 2010.

How does XML describe data?

xml uses tags to describe data, any computer can then read the data using the tags.

Hello world program?

A "Hello world" program is usually the very first program you write when learning a new programming language, it simply prints out the text "Hello World". Below are a few examples:

PHP:

echo "Hello World";

_____________________________________

JavaScript:

document.write("Hello World");

_____________________________________ Visual Basic:

Module Hello

Sub Main()

MsgBox("Hello, World!") ' Display message on computer screen.

End Sub

End Module

What is HTML template framework?

HTML can use templates which are already made. The users can just modify the templates according to their needs.

What attribute is used to specify the thickness of a hr tag?

Use the size attribute to specify the height (or thickness) of the rule.

For example:



Note: Since HTML 4.01, the


align, noshade, size and width attributes are deprecated. Use style properties instead.

What is the most common scripting language?

JavaScript is the most famous scripting language. It is the most flexible and widely used.

How do you make an int value increase every 24 hours in JavaScript?

setInterval ( "increaseIntVal()", 86400000);

function increaseIntVal( )

{

// (do something here)

}

Where is the best place to buy a website?

There never really is a "Best" place to buy webspace; Every web host company offers different things. Different people want different things. Perhaps you need the PHP engine to be installed, or have it pre-installed; To have MySQL operatable on your website; So on. And price is always a factor, too. ---- One example of a good host is BlueHost. At the time of writing, they offer unlimited Bandwidth and Web space, Ruby on Rails, PHP, several database engines, and a whole lot more. They even provide you with a free domain. [ http://www.bluehost.com/ ]

What is phishing website?

a website that's trying to scam you into giving your credit card number, e-mail, etc.

Is Java a Client or Server side scripting language?

Both. It runs on the browser but can request from a Server.

Similarly to Ajax the side is unclear. Client side is the best fit with requests.

How do you create a login page with user name and password fields?

It is quite simple to create a login page, it is simply a form input, if all the people hold the same username and password. If you want and I suspect you do, a unique service, then you will need to install a database. I have no experience of this.

Do you need XML?

Some programs require XML-structured data. But there are ways around that, so if you know that programs do not need XML-structured data, then no -- you do not need XML.

What is XML 4.0?

XML 4.0 is a version of XML that does not yet exist.

The latest version is 1.1, visit the w3c site to see the spec

Which is better to use while submitting a form GET method or POST method?

If your form has security items (like username, password) use POST method. Because post method is more secure. Otherwise you can use GET method. Also GET method is faster than POST method.

What is a frameset tag and its attributes?

The frameset tag is used to define the layout of a web page which uses frames. It defines how many frames, their sizes, and what pages get loaded in each one. A web page which uses frames actually calls for separate web pages to load in each frame. The attributes and further description are all listed here: http://devedge-temp.mozilla.org/library/manuals/1998/htmlguide/tags11.html#1294825

What is hyper active?

Hyperative is a state in the human body that kids have until they reach the age of 18. For EX. Samuel Johnson is the fastest kid in my class (Wilkinson and Howard) he drinks Gatorade everyday so it makes him have speed.So one day I was walking into the portable then he just was talking about some stuff. The I cussed to him in spainsh.Then in PE he was acting CRAZY so I just gave him the soft balls so he will be done from his state.So from now on I am Just taking procausin. (Greg Gutierrez wrote this on 5-18-09)

What is the difference between WebService and API?

web service is like advanced Urls and API is Programmed Interface. API contains classes and Interfaces just like a program. A web service is a form of API (Application Programming Interface). An API is used by a computer programmer to establish a link between software applications. This interface can take several forms, a web service is just one of these. There are several types of web service. SOAP (Simple Object Access Protocol) is one of the most common. The API takes the form of a service description (WSDL) which is used to automatically generate the program code which makes the connection.

Source code for notepad in java?

import java.awt.*;

import java.awt.event.*;

import java.awt.datatransfer.*;

import java.io.*;

public class Editor extends Frame

{

String filename;

TextArea tx;

Clipboard clip = getToolkit().getSystemClipboard();

Editor()

{

setLayout(new GridLayout(1,1));

tx = new TextArea();

add(tx);

MenuBar mb = new MenuBar();

Menu F = new Menu("file");

MenuItem n = new MenuItem("New");

MenuItem o = new MenuItem("Open");

MenuItem s = new MenuItem("Save");

MenuItem e = new MenuItem("Exit");

n.addActionListener(new New());

F.add(n);

o.addActionListener(new Open());

F.add(o);

s.addActionListener(new Save());

F.add(s);

e.addActionListener(new Exit());

F.add(e);

mb.add(F);

Menu E = new Menu("Edit");

MenuItem cut = new MenuItem("Cut");

MenuItem copy = new MenuItem("Copy");

MenuItem paste = new MenuItem("Paste");

cut.addActionListener(new Cut());

E.add(cut);

copy.addActionListener(new Copy());

E.add(copy);

paste.addActionListener(new Paste());

E.add(paste);

mb.add(E);

setMenuBar(mb);

mylistener mylist = new mylistener();

addWindowListener(mylist);

}

class mylistener extends WindowAdapter

{

public void windowClosing (WindowEvent e)

{

System.exit(0);

}

}

class New implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

tx.setText(" ");

setTitle(filename);

}

}

class Open implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

FileDialog fd = new FileDialog(Editor.this, "select File",FileDialog.LOAD);

fd.show();

if (fd.getFile()!=null)

{

filename = fd.getDirectory() + fd.getFile();

setTitle(filename);

ReadFile();

}

tx.requestFocus();

}

}

class Save implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

FileDialog fd = new FileDialog(Editor.this,"Save File",FileDialog.SAVE);

fd.show();

if (fd.getFile()!=null)

{

filename = fd.getDirectory() + fd.getFile();

setTitle(filename);

try

{

DataOutputStream d = new DataOutputStream(new FileOutputStream(filename));

String line = tx.getText();

BufferedReader br = new BufferedReader(new StringReader(line));

while((line = br.readLine())!=null)

{

d.writeBytes(line + "\r\n");

d.close();

}

}

catch(Exception ex)

{

System.out.println("File not found");

}

tx.requestFocus();

}

}

}

class Exit implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

System.exit(0);

}

}

void ReadFile()

{

BufferedReader d;

StringBuffer sb = new StringBuffer();

try

{

d = new BufferedReader(new FileReader(filename));

String line;

while((line=d.readLine())!=null)

sb.append(line + "\n");

tx.setText(sb.toString());

d.close();

}

catch(FileNotFoundException fe)

{

System.out.println("File not Found");

}

catch(IOException ioe){}

}

class Cut implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

String sel = tx.getSelectedText();

StringSelection ss = new StringSelection(sel);

clip.setContents(ss,ss);

tx.replaceRange(" ",tx.getSelectionStart(),tx.getSelectionEnd());

}

}

class Copy implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

String sel = tx.getSelectedText();

StringSelection clipString = new StringSelection(sel);

clip.setContents(clipString,clipString);

}

}

class Paste implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

Transferable cliptran = clip.getContents(Editor.this);

try

{

String sel = (String) cliptran.getTransferData(DataFlavor.stringFlavor);

tx.replaceRange(sel,tx.getSelectionStart(),tx.getSelectionEnd());

}

catch(Exception exc)

{

System.out.println("not string flavour");

}

}

}

public static void main(String args[])

{

Frame f = new Editor();

f.setSize(500,400);

f.setVisible(true);

f.show();

}

}