Wednesday, 18 December 2013

INPUT


input

A form element that can be represented as a text box, password text box, check box, radio button, submit button, reset button, hidden input field, image (which acts as a submit button), file selection box or general button.

Attributes
  • name can be used so that the value of the element can be processed.
  • type can be used to specify the type of input. Values can be text (default), password, checkbox, radio, submit, reset, hidden, image, file or button.
  • value can be used to specify the initial value. It is required when type is set to checkbox or radio. It should not be used when type is set to file.
  • checked can be used when type is set to checkbox or radio to set the initial state of a check box or radio button to be selected. It must be used in the format checked="checked".
  • maxlength can be used to specify the maximum number of characters allowed in a text box.
  • src can be used when type is set to image to specify the location of an image file.
  • alt can be used when type is set to image to specify the alternative text of the image, which should be a short description.
  • accept can be used when type is set to file to specify which file-types should be accepted. This is a comma-separated list of MIME types.
  • disabled can be used to disable an element. It must be used in the format disabled="disabled".
  • readonly can be used to specify that the value of the element can not be changed. It must be used in the format readonly="readonly".
  • accesskey can be used to associate a keyboard shortcut to the element.
  • tabindex can be used to specify where the element appears in the tab order of the page.
Example

<form action="somescript.php" />
        <p>Do you like pie?</p>
        <div>yes <input type="radio" name="pie" value="yes" checked="checked" /></div>
        <div>no <input type="radio" name="pie" value="no" /></div>
        <div>Your name: <input type="text" name="name" /></div>
        <div><input type="image" name="submitimage" src="someimage.gif" /></div>
</form>

INS


ins

Insertion. Used to define an editorial insertion of content. Often used along with del.

Attributes
  • cite can be used to specify the location (as a URI) of an explanation of why the insertion was made.
  • datetime can be used to specify when the insertion was made.
Example

<p>It really was <ins cite="rarara.html" datetime="20031024">very</ins> good.</p>

IMG


img

Image.
Note: When an image is used as a link, many browsers will show a border around the image. To get rid of this you should use CSS (border: 0).

Attributes
  • src is used to specify the location of the image file.
  • alt is used to specify the alternative text of the image, which should be a short description.
Optional Attributes
  • longdesc can be used to specify the location (in the form of a URI) of a description of the image.
  • height can be used to define the height of the image (in pixels). This can also be done with CSS.
  • width can be used to define the width of the image (in pixels). This can also be done with CSS.
Example

<img src="http://www.YAHOO.com/images/logo.gif" alt="WALLPAPER" />

FORM


form

Defines a form allowing user-inputted data to be sent somewhere. It is used with elements such as input, select and textarea.

Attributes
  • action is used to specify where the form is sent to. It must take the form of a URI.
Optional Attributes
  • method can be used to specify how the form is sent. The value must be get (default), which bolts the form values onto the URI or post which invisibly sends the form data in the body of the HTTP request.
  • enctype can be used to specify the MIME type used to encode the form data. The default value is application/x-www-form-urlencoded, but this should be multipart/form-data when the form contains a file input element.
  • accept can be used to specify which file-types (selected from a file input element) should be accepted. This is a comma-separated list of MIME types.
  • accept-charset can be used to specify which character sets should be accepted. This is a comma-separated list.
Example

<form action="/somedirectory/somforgscript.php" method="post">
        <div>House number: <input type="text" name="housenumber" /></div>
        <div>Street: <input type="text" name="street" /></div>
        <div><input type="submit" /></div>
</form>

HTML


html

The root element that specifies that the content of the document is HTML. The opening tag immediately follows the DOCTYPE declaration and the closing tag is the last thing in the document. The html element must contain the headand the body elements.

Attributes
  • xmlns is used to define the XML namespace. The value must be http://www.w3.org/1999/xhtml.
Example

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head>
               [stuff]
        </head>
        <body>
               [stuff]
        </body>
</html>

FIELDSET


fieldset

Defines a group of related form items.

Example

<fieldset>
        <div>First name: <input /></div>
        <div>Surname: <input /></div>
</fieldset>

DT


dt

Definition term. Used in conjunction with dl to define a definition list and dd, to define the description linked with the term.

Example

<dl>
        <dt>Dog</dt>
        <dd>A carnivorous mammal of the family Canidae.</dd>
</dl>

EM

DOCTYPE


DOCTYPE

Document type declaration. This is used to let the browser know what version of HTML you are using. If you don't use it, or if you get it wrong, the browser will assume you don't know what you're doing and switch to 'quirks mode', which will not render things as they should be. Apparently it's more 'forgiving' but it actually seems to be quite random and confusing.
The case must be like that in the example below (with upper case 'DOCTYPE'). It does not close like other tags.

Example

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

"Missing a required sub-element of HEAD"


"Missing a required sub-element of HEAD"

If you receive the error "Missing a required sub-element of HEAD", check that you have included the TITLE element in the HEAD. The TITLE element is required in all HTML documents.





Other Topics

Wednesday, 11 December 2013

HTML : DFN


dfn

Definition term. The title attribute is often used to describe the definition.

Example

<p><dfn title="Microsoft web browser">Internet Explorer</dfn> is the most popular browser used underwater.</p>

HTML : DL


dl

Definition list. Used in conjunction with dt to define definition terms and dd, to definition descriptions.

Example

<dl>
        <dt>Dog</dt>
        <dd>A carnivorous mammal of the family Canidae.</dd>
</dl>

Physics basic inventions and inventors

1.Which instrument is used to measure altitudes in aircraft's ? Audiometer Ammeter Altimeter Anemometer Explanation : ...