Skip to main content

Posts

Showing posts from January, 2015

How To Create List In HTML?

To create a bulleted list you need to add a <ul> and a </ul> tag at the beginning and the end of the list.  Numbered lists have <ol> tags instead of <ul> tags. To separate single list items, use <li> and </li> tags. Look at these examples to see the detailed syntax:   Unordered List Explanation / Example <ul> <li>text</li> <li>text</li> <li>text</li> </ul> Makes a bulleted list using the default bullet type: ·          text ·          text ·          text <ul type="disc"> Starts a bulleted list using discs as bullets: ·          This is one line ·          This is another line ·          And this is the final line <ul type="circle"> Starts a bulleted list using circles as bullets: o     This is one line o     This is another line o   

How To Declare Variables in JavaScript?

Variables can be thought of as named containers. You can place data into these containers and then simply refer to the data by naming the container. Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows: <script type="text/javascript"> var xyz; var abc123; var stu_dent;  </script> The scope of a variable is the region of your program in which it is defined. JavaScript variable will have only two scopes: Global Variables: A global variable has global scope which means it is defined everywhere in your JavaScript code.  Local Variables: A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.

What Is JavaScript?

JavaScript is  a lightweight, interpreted programming language. It is  designed for creating network-centric applications. JavaScript is  complementary to and integrated with HTML.  The JS statements are placed within the <script> ... </script> tags in a web page. You can place the <script> tag containing JS code anywhere in the web page, but the preferred way to keep it within the <head>...</head> tags.

How To Declare DOCTYPE In HTML Documents?

The <!DOCTYPE> declaration must be the very first thing in the HTML document, before the <html> tag. The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in. In the previous versions of HTML, the <!DOCTYPE> declaration refers to a DTD (Document Type Definition), because they are based on SGML (Standard Generalized Markup Language). The DTD specifies the rules for the markup language, so that the browsers render the content correctly.  HTML5 is not based on SGML, and so does not require a reference to a DTD. The <!DOCTYPE> declaration is NOT case sensitive.

How To Select Correct Image Format For Your Website?

The most commonly used file formats used for images are JPEG, GIF, and PNG. They are compressed formats, and have very different uses. A JPEG (pronounced “jay-peg”) uses a mathematical algorithm to compress the image and will distort the original slightly. The lower the compression, the higher the file size, but the clearer the image. JPEGs are typically used for images such as photographs. A GIF (pronounced “jif”) can have no more than 256 colors, but they maintain the colors of the original image. The lower the number of colors you have in the image, the lower the file size will be. GIFs also allow any pixel in the image to be transparent. GIFs are typically used for images with solid colors, such as icons or logos. A PNG (pronounced “ping”) replicates colors, much like a GIF, but allows 16 million colors as well as alpha transparency (that is, an area could be 50% transparent). PNGs are typically used for versatile images in more complex designs BUT they are not fully

How to Create Tables in HTML?

HTML tables are still best known for being used and abused to lay out pages. There are a number of tags used in tables, and to fully get to grips with how they work is probably the most difficult area for HTML Beginners. Copy the following code into the body of your html document and then I will go through what each tag is doing: <table>     <tr>         <td>Row 1, cell 1</td>         <td>Row 1, cell 2</td>         <td>Row 1, cell 3</td>     </tr>     <tr>         <td>Row 2, cell 1</td>         <td>Row 2, cell 2</td>         <td>Row 2, cell 3</td>     </tr>     <tr>         <td>Row 3, cell 1</td>         <td>Row 3, cell 2</td>         <td>Row 3, cell 3</td>     </tr>     <tr>         <td>Row 4, cell 1</td>         <td>Row 4, cell 2</td>         <td>Row 4