Tuesday, 30 April 2013

html image align in center

<CENTER>

<IMG SRC="images/ex.gif">

</CENTER>


Here, you will learn how to align your picture to the center of the screen. The starting tag is <CENTER> and the closing tag is </CENTER>. The picture(s) between these two tags is what is aligned to the center.


to set the image align in center its only possible 


Example :


<%-- 
    Document   : index
    Created on : Apr 27, 2013, 3:10:42 PM
    Author     : backup
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SmallForexWeb</title>
    </head>
    <body>
        <table>
            <table border="2px" width="100%" height="50px">
            <tr>
                <td>HOME</td>
           <td>ABOUT US</td>
            <td>REGISTRATION</td>
            <td>SUPPORT</td>
            </tr>
              </table >
        <table border="2px" width="100%" height="300px">
            <tr>
                <td>
            <center>
                    <img   width="234px" height="215px" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTeL-h8gByMkOydy-baBAJCn7PROKKq1lyyIH6cjjrLsw108uyt2A">
            </center>
            
                </td>
            </tr>
        </table>
        <table border="2px" width="100%" height="400px">
            <tr>
                <td width="50%">REPORT
                    <img width="100%" height="400px"src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSmerj8q8k4_elbfVz0cgw2IOOoG9_TLfSIcxNRpYFfucofFlFS">
                </td>
                <td width="50%">PERFORMANCE
                    <img width="100%" height="300px" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTFpMKWGB9hUJTf1TlRb0aEi8Dpn0EPYYTVPrmq9hJfMYK5VO2v">    
                </td>
            </tr>
        </table>
        </table>
        </body>
</html>

No comments:

Post a Comment