Saturday 26 March 2016

How to Create a Website with or without from scratch?

Creating a website from ready-made software's



There are 5 steps in creating a website
1) By a Domain --from Godaddy ,Bigrock etc etc.   ( I suggest Godaddy)

2) Chose your Hosting--Godaddy,Wordpress,Hostinger etc etc. (I suggest free hosting from hostinger)

3) If not buying a hosting from wordpress then install wordpress in cloud of your hosting and there only set a username and password for your wordpress account .
watch a video given below


4)Link your hosting server (gernally called as name server) to your domain account
   watch a video given below

5) Wait for 2-3 hours your website will be activated .Just check your activation at
 www.xyz.com/wp-admin.Now enter your wordpress username and pass that you have set while installing wordpress in your hosting

Creating a website from Scratch


Here i can help you by giving my scratch material rest is your dedication and creativity

Software you are required to install
1)notepad ++
2)wamp server-if ur pc is 64 bit
   xampp server-if ut pc is 32 bit . Little difficult to get

3)Bootstrap libraries--which should be present in the same folder where you are creating your html and css file.i will tell about these two files in future text.

The Things you Should Know

1)


 Html 
it is the basic language that you have learnt in your 10th class .
Given are the basic codes that you can type and check. Now you will also ask why should i learn html as now there is a time of html 5 . Now my friend as far as i reseached i get html 5 is nothing but the html only with only one major difference which is that in html you need to install many plugins to interact video and audio's with your html page .but html5 only makes linking these video's and audio's with the simple <video> and <audio> tags with many other cool functionalities also.


  1. <html>
  2. <head>
  3. <title>form</title>
  4. <body>
  5. <form>
  6. <h1 align="center">welcome to simplified theory survey</h1>
  7. <img src ="
  8. C:\Users\Himanshu\Desktop\simplified theory.PNG" alt="sorry for inconvinence" height="250" width="200">
  9. <p>what is your name?</p>
  10. <input type="text" name="name"><br>
  11. <p>what is your gender?</p>
  12. <input type="radio" name="gender" value="male">Male<br>
  13. <input type="radio" name="gender" value="female">Female<br>    
  14. <br>
  15. <p>which language do u know?</p>     <--!check boxes are for multiple select-->
  16. <h3><u><i>which language do u know?</u></i></h3> 
  17. <input type="checkbox" name="language" value="java">java<br>
  18. <input type="checkbox" name="language" value="c">c<br>
  19. <br>
  20. <input type="submit" name="Submit" value="submit"><br>
  21. <a href="link.html">click here to open link</a>



  22. </body>
  23. </head>
  24. </html>
Must change image link before using this code

Now what is the css file

CSS is  a file that is  the kind of facial Makeup for your html file.i.e  u can have a beutiful borders and Some More Cool Graphical Sort of things with your css file.

The given below file is excercise1.html file

  1. <html>
  2. <head>
  3. <title>Excercise 1</title>
  4.  
  5. <link 
  6. rel="stylesheet"
  7. href="excercise3.css"
  8. type="text/css"
  9. media="all"
  10. />
  11.  
  12. <body>
  13. <h1>welcome to Excercise 1 page</h1>
  14. <h2>welcome to Excercise 1 page</h2>
  15. <h3>welcome to Excercise 1 page</h3>
  16. <ul>
  17. <li>thankyou</li>
  18. <ol type="a">
  19. <li> this is a no.1</li>
  20. <li> this is a no.2</li>
  21. </ol>
  22. <li>welcome</li>
  23. </ul>
  24. <table border="1">
  25. <tr>
  26. <td><a href="link.html">click here</a>
  27.  </td>
  28. <td>cell 2</td>
  29. </tr>
  30. <tr>
  31. <td>cell 3</td>
  32. <td>cell 4</td>
  33. </tr>
  34. <a href="link.html">click here</a>
  35.  
  36.  
  37. </body>
  38. </head>
  39. </html>
  40.  
In above code .This code i.e
  1. <link 
  2. rel="stylesheet"
  3. href="excercise3.css"
  4. type="text/css"
  5. media="all"
  6. />

is linking your that html file with the css file "excercise3.css" . which is as follow
  1. body
  2. {
  3. background-color:pink;
  4. border-style:solid;
  5. border-width:5px;
  6. padding-top:50px;
  7. padding-right:20px;
  8. padding-left:30px;
  9. background-image:url("file:///C:/Users/Himanshu/Desktop/simplified%20theory.PNG");
  10.  
  11. }
  12.  
  13. li
  14. {
  15. font-family:"Times New Romon";
  16. font-size:25px;
  17. margin-left:100px;
  18. color:red
  19. }

Now see in this css file you are giving property of all material under body tag some features like
You are saying that background color should be pink,border style should be solid and etc etc.In that exercise1.html code .u also has link.html file .the code of this file is provided below
  1. <html>
  2. <head>
  3. <title>link.html</title>
  4. <body>
  5. <h1>Welcome to link.html</h1>
  6. <br>
  7. <img src="
  8. C:\Users\Himanshu\Desktop\simplified theory.PNG" alt="sorry for inconvinence" height="250" width="200">
  9.  
  10.  
  11. </body>
  12. </head>
  13. </html>

In above code alt will be dispayed if image will not displayed. And that height and width is specified for the image that we want to get displayed.
Now Let us discuss about bootstrap 
As far as i have make out bootstrap is the name of library which facilates a kind of more new features to your html file beside css file.like table hover .table stripped etc.
One more new thing you will find in a below bootstrap code is concept of class and div .learn about in detail from the video provided below


Now let us finally let see the simple example of bootstrap library


  1. <html>
  2. <head>
  3. <title>bootstrapuse </title>
  4. <link 
  5. rel="stylesheet"
  6. href="bootstrap.css"
  7. type="text/css"
  8. media="all"
  9. />

  10. <link 
  11. rel="stylesheet"
  12. href="bootstrap.min.css"
  13. type="text/css"
  14. media="all"
  15. />

  16. <link 
  17. rel="stylesheet"
  18. href="bootstrap-theme.css"
  19. type="text/css"
  20. media="all"
  21. />

  22. <link 
  23. rel="stylesheet"
  24. href="bootstrap-theme.min"
  25. type="text/css"
  26. media="all"
  27. />
  28. </head>
  29. <body>
  30. <div class="container">
  31. <div class="col-lg-6">
  32. <h2>col1</h2>
  33. <p>hgdweyjfdguerfb</p>
  34. </div>

  35. <div class="col-lg-6">
  36. <h2>col2</h2>
  37. <p>hgdweyjfdguerfb</p>
  38. </div>

  39. <div class="col-lg-12">
  40. <p>hgdweyjfdguerfb</p>
  41. </div>

  42. <div class="col-lg-3">
  43. <h2>col1</h2>
  44. <p>hgdweyjfdguerfb</p>
  45. </div>

  46. <div class="col-lg-3">
  47. <h2>col2</h2>
  48. <p>hgdweyjfdguerfb</p>
  49. </div>

  50. <div class="col-lg-3">
  51. <h2>col3</h2>
  52. <p>hgdweyjfdguerfb</p>
  53. </div>

  54. <div class="col-lg-3">
  55. <h2>col4</h2>
  56. <p>hgdweyjfdguerfb</p>
  57. </div>

  58. <div class="col-lg-3">
  59. <h2>col5</h2>
  60. <p>hgdweyjfdguerfb</p>
  61. </div>

  62. <div class="col-lg-3">
  63. <h2>col6</h2>
  64. <p>hgdweyjfdguerfb</p>
  65. </div>

  66. <div class="col-lg-2">
  67. <h2>col7</h2>
  68. <p>hgdweyjfdguerfb</p>
  69. </div>

  70. <div class="col-lg-2">
  71. <h2>col8</h2>
  72. <p>hgdweyjfdguerfb</p>
  73. </div>

  74. <div class="col-lg-2">
  75. <h2>col7</h2>
  76. <p>hgdweyjfdguerfb</p>
  77. </div>

  78. <div class="col-lg-2">
  79. <h2>col8</h2>
  80. <p>hgdweyjfdguerfb</p>
  81. </div>
  82. </div>

  83. </body>
  84. </html>



Now here the output of the above code will something like as follow




The above code was just to make out the understanding of class,div and the New kind of font and graphics featured by bootstrap library that you can find by analyzing about output.

Now if want to master you should now only work on 2 major projects which are shown an taught through video given in the last of every project.

1.collapse Navigation Bar
 It will look like 




Code:

  1. <html>
  2. <head>
  3. <title>Google</title>

  4. <link rel="stylesheet" href="./css/bootstrap.css">
  5. <link rel="stylesheet" href="./css/bootstrap.min.css">
  6. <link rel="stylesheet" href="./css/bootstrap-theme.css">
  7. <link rel="stylesheet" href="./css/bootstrap-theme.min.css">
  8. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  9. <script src="./js/bootstrap.min.js"></script>

  10. </head>
  11. <body>
  12.  <nav class="navbar navbar-default">
  13.   <div class="container">
  14.      <div class="navbar-header">
  15.       <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
  16.         <span class="icon-bar"></span>
  17.         <span class="icon-bar"></span>
  18.         <span class="icon-bar"></span>                        
  19.       </button>
  20.       <a class="navbar-brand" href="#">WebSiteName</a>
  21.     </div>
  22.     <div class="collapse navbar-collapse" id="myNavbar">
  23.       <ul class="nav navbar-nav">
  24.         <li class="active"><a href="#">Home</a></li>
  25.         <li><a href="#">Page 1</a></li>
  26.         <li><a href="#">Page 2</a></li>
  27.       </ul>
  28.   </div>
  29. </div>
  30.  </nav>

  31. </body>
  32. </html>
To Know it's made watch Video given below:-



And 

2nd Project is the Sliding Bar

It will look like


Code

  1. <html>
  2. <head>
  3. <title>Exercise</title>

  4. <link rel="stylesheet" href="./css/bootstrap.css">
  5. <link rel="stylesheet" href="./css/bootstrap.min.css">
  6. <link rel="stylesheet" href="./css/bootstrap-theme.css">
  7. <link rel="stylesheet" href="./css/bootstrap-theme.min.css">
  8. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  9. <script src="./js/bootstrap.min.js"></script>
  10.  <style>
  11.   .carousel-inner > .item > img
  12.    {
  13.       width: 40%;
  14.       margin: auto;
  15.   }
  16.   </style>
  17. </head>
  18. <body>
  19.  <div id="myCarousel" class="carousel slide" data-ride="carousel">
  20.   <!-- Indicators -->
  21.   <ol class="carousel-indicators">
  22.     <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
  23.     <li data-target="#myCarousel" data-slide-to="1"></li>
  24.     <li data-target="#myCarousel" data-slide-to="2"></li>
  25.   </ol>

  26.   <!-- Wrapper for slides -->
  27.   <div class="carousel-inner" role="listbox">
  28.     <div class="item active">
  29.       <img src="1.jpg" alt="Cat" width="200" height="200">
  30.     </div>

  31.     <div class="item">
  32.       <img src="2.jpg" alt="Cat" width="200" height="200">
  33.     </div>

  34.     <div class="item">
  35.       <img src="3.jpg" alt="Cat" width="200" height="200">
  36.     </div>

  37.    
  38.   </div>

  39.   <!-- Left and right controls -->
  40.   <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
  41.     <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
  42.     <span class="sr-only">Previous</span>
  43.   </a>
  44.   <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
  45.     <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
  46.     <span class="sr-only">Next</span>
  47.   </a>
  48. </div>

  49. </body>
  50. </html>




Video



Now Let us learn what is PHP 

Till Now whatever u have studied was the part of Website Designing .i.e that stuff will make you capable to draw how your website should look..

But what about a adding a feature like adding calculator feature and other kind of feature for your website for that you need a programming langauage. PHP and java script are that programming languages only. 

Watch below 2.15 minutes of video to make out better what i have just expalined





Now let us discuss the basic code of php's

suppose you have created a form html file as earlier but now you also want to see what you have entered in your field. for that you need a two files one of html and other that of php

the given file is formecho.html

  1. <html>
  2. <body>
  3. <form action="formecho.php" method="POST">
  4. email:<input type="text" name="email">
  5. phn num:<input type="text" name="phn">
  6. <input type="submit" name="button" value="submit">
  7. </form>
  8. </body>
  9. </html>
and there is also one php file along with it which is named as  phpecho.php for simplicity
and its code is as follow :-

  1. <!-- we are edited the form.html because of it -->
  2. <?php
  3. if(isset($_POST["button"]))
  4. {
  5. $email=$_POST["email"];
  6. $phn=$_POST["phn"];
  7.     echo $email;
  8. echo '<br>';
  9. echo $phn;
  10. INSERT INTO `students`(`id`, `name`) VALUES ('$phn','$email')
  11. }
  12. ?>
Now here <?    lab lab ! ?> is the syntax of php file and
$ is used to intiallize variable like here email ,phn 
and
echo is a keyword that is use to display the variable
and INSERT command is the sql command which will be used in order to put this data in your database. and obviously this database needs an server and for that only we have dowloaded an ofline server XAMPP in case you have 32-bit processor and WAMP in case you have 64-bit processor.How to use this server and run above code i will tells soon . One more thing i want to tell that while you will run your code in 32-bit PC .there you may have chances that you might not run some of the programs in your ofline server XAMP but surely if your approch is correct than u will run them your practical server i.e your hosting.

Now let us discuss  How to use this server and run above code

To use above server followuing commands will be used like

1)localhost/formecho.php to run your php code
2)localhost/phpmyadmin to create your data base 

How to create phpmyadmin database for that 2-3 min video given below



the above video is for XAMP similar steps is for WAMP also.

I have written one code for fetching data from wamp server .you can have a look at it.in the below code the beauty is that i have used both php as well as html code in same file named as "fetchingdatafrombackend.php".the code is here-->

  1. <?php
  2. error_reporting(E_ERROR);
  3. include "connect_to_mysql.php";
  4. $sql= mysql_query("SELECT * from students");
  5. while($row=mysql_fetch_array($sql))
  6. {
  7. $name=$row["name"];
  8. $stream=$row["stream"];
  9. $view .='
  10.      <tr>
  11.  <td>'.$name.'</td>
  12.  <td>'.$stream.'</td>
  13.  </tr>
  14.  ';
  15.   
  16. }
  17. ?>

  18. <html>
  19. <head>
  20. <title>Data from backend</title>
  21. </head>
  22. <body>
  23. <h1>DATA from backend</h1>
  24. <table border="1">
  25. <tr>
  26. <td>Name</td>
  27. <td>Stream</td>
  28. <td>id</td>
  29. </tr>
  30. <?php echo $view;?>
  31. </table>
  32. </body>
  33. </html>
Now what is javascript
i also not know much about it but know when u open your google chrome-->right click-->inspect and go to console that is a command window of java script. Must type 2+3 there and see the magic you will find 5 as your output....
Learn Javascript and Must share your own short blog like mine in comment section

Beside above i have also done lot more research on creating more sexy websites.
For that you can 
1) Google WebDeveloper tool 
2) Gdrive and Google also have its free hosting if you are into coding then you can check Google Cloud
 
Watch Video


To test your above webpages you can use
1) Github
2) you can also get free domain with .tk extension at  dot.tk website

There are also following smart ways to Host your Website