C# Programming: June 2018

Wednesday, June 27, 2018

Dropdownlist in HTML in easy way | Select Tag in HTML with options| Lear...





This video demonstrate how to make dropdownlist in html using select tag. Three options are made with select and option tag.



code:

<!DOCTYPE html>

<html>

<head>

      <title>Dropdown list</title>

</head>

<body>

<h2> Select Any Fruits</h2>



<form action="process.php" >

    <select name="fruits">

      <option value="mango">Mango</option>

<option value="apple">Apple</option>

<option value="orange">Orange</option>

    </select>

    <br/>

<br/>

    <input type="submit" name="submit">

</form>

</body>

</html>

Tuesday, June 26, 2018

HTML login form with PHP processing | Check username and password in php...

Html code:

<!DOCTYPE html>

<html>

<head>

<title>Login</title>

</head>

<body>

<form action="logincheck.php" method="post">

  Username:<br>

  <input type="text" name="username" >

  <br>

  Password:<br>

  <input type="password" name="password" >

  <br><br>

  <input type="submit" value="Submit">

</form>
</body>

</html>

Description:

Here in avove html code form tag is used to make form in html such as login or signup form, here i have made a login form. Action is an attribute where we give from which php file our login information will be processed. Here i have logincheck.php file . Method attribute is used to declare whether our form submission method is post method or get method normally we use two methods but there  are other also. Php post method hide the details and get method display in url so for sensitive work like sending password we must use post method.

    Input is used to make typing boxes, we have made two boxes for username and password , type=text means our text is visibke and type =password mean our text is hidden and shown in bullet form.

At last input type=submit means we have created a button upon clicking of it our login info is sent to the provided action file here is logincheck.php.



PHP code:

<?php

$username=$_POST['username'];

$password=$_POST['password'];

if($username == "username" && $password=="password")

{
echo "You are successfully logged in";
}

else

{

echo "Sorry username or password is wrong.";

}

?>

Description:

Here two variables are used to store values passed from html form for username and password $_POST is used for such task. By using if condition we check whether given username and password are correct or not here we have hard coded value for username and password as "username" and "password"  respectively.If there correct info echo will display success message else not. echo is used to print any text.





This video demonstrates how we can make login form and process it with php. Post method is used to submit login form data to the php action file.

Monday, June 25, 2018

Positioning of DIV in HTML and CSS | How to use float in css | Learn HTML5





This video demonstrate the positioning of div in html and css, this video show how we can use float attribute in css.



code:



<!DOCTYPE html>

<html>

<head>

<title>Positioning in HTML and Css</title>

<style type="text/css">

       #firstdiv {

            background-color: blue;

            color:white;

            text-align: center;

            width:400px;

            height:100px;

            margin:5px;

            float:right;

           

      }



       #seconddiv {

            background-color: green;

            color:white;

        text-align: center;

            width:400px;

            height:100px;

            margin:5px;

            float:right;

           

      }





 #thirddiv {

            background-color: red;

            color:white;

        text-align: center;

            width:400px;

            height:100px;

            margin:5px;

            float:right;

           

      }





</style>



</head>

<body>

<div id="firstdiv"> First Div </div>

<div id="seconddiv"> Second Div </div>

<div id="thirddiv"> Third Div </div>

</body>

</html>

What is Head in HTML? | How to use header section in html |Learn HTML5





This video demonstrate how to use header section in html that is it gives answer of what is head in html.



code:

<!DOCTYPE html>

<html>

<head>

<title>Learning Header Section</title>



<style>

  body {

  background-color: yellow;

  }



</style>



<script>

function shout()

{

alert("i am shouting.")

}



</script>

</head>

<body onload="shout()">

something in body part

</body>

</html>

Sunday, June 24, 2018

How to use Javascript in HTML | Make function in Javascript | Learn HTML5





This video demonstrate how to use javascript in html by making function in javascript.



code:

<!DOCTYPE html>

<html>

<head>

<title>Learning Javascript</title>



<script>

  function displayTime()

  {

  document.getElementById('para1').innerHTML= Date();

  }

</script>

</head>

<body>

<h2>Learning Javascript</h2>



<button onclick="displayTime()" >Click me</button>



<p id="para1">Paragraph without change </p>

</body>

</html>

Friday, June 22, 2018

How to use iframe in html | Dispaly one website into another website | L...





This video demonstrate how to use iframe in html, here we can embed one website into another that is displaying one website into another.



code:

<!DOCTYPE html>

<html>

<head>

<title>Iframe</title>

</head>

<body>

<iframe src="https://www.godaddy.com" width="500" height="700"/>

</body>

</html>

Difference between ID and Class in HTML and Css | Learn HTML5





This video demonstrate the difference between id and class in html in very easy way.



Difference between id and class
Id is
used to identify unique element in html to apply
css/script.
Class is uded to identify group of elemens to apply css/script.
* But there no any default validation
on browser take it as
discipline,later you
will notice when we dig into
javascript also.

code:
<!DOCTYPE html>
<html>
<head>
<title>Id and class</title>

<style type="text/css">
#firstbox{
background-color: lightblue;
padding: 10px;
color:white;
}

          .greenboxes{
          background-color: green;
          padding: 20px;
          color:yellow;
          }

        

</style>
</head>
<body>
<p id="firstbox"> I am in firstbox </p>

<p class="greenboxes"> I am in green box <p>
<p class="greenboxes"> I am in green box </p>
<p class="greenboxes"> I am in green box <p>
</body>
</html>

Thursday, June 21, 2018

Difference between Div and Span in html | Learn HTML5





This video demonstrate the difference between Div and span in html.



code:

<!DOCTYPE html>

<html>

<head>

<title>DIV and Span</title>

</head>

<body>

<div style="color:white;background-color: blue;"> Div is a block element

</div>

<div style="color:white;background-color: pink;" > Div is a block element

</div>



<span style="color:white;background-color: red;">Span is an inline element</span>

<span style="color:white;background-color: green;">Span is an inline element</span>

</body>

</html>

Make List in HTML easily | Ordered List in HTML | Learn HTML5





This video demonstrate how we can make ordered list in html.



code:

<!DOCTYPE html>

<html>

<head>

<title>Ordered List</title>

</head>

<body>

<ol type="i">

<li>Laptop</li>

<li>Hard disk</li>

<li>Mouse</li>

</ol>

</body>

</html>

Wednesday, June 20, 2018

How to Make a list in HTML | List





This video demonstrate how to make a list in html. Here list is made as unordered list. Plus a css style is used to change the symbols in onordered list in html.



code:

<!DOCTYPE html>

<html>

<head>

<title>List in HTML</title>

</head>

<body>

<ul style="list-style-type: disc;">

<li>Mango</li>

<li>Apple</li>

<li>Orange</li>

</ul>

</body>

</html>

Tuesday, June 19, 2018

Make Table in HTML in very easy way | Learn HTML5





This video demonstrate how to make table in html in very easy way. some style is also used to make table attractive.

Monday, June 18, 2018

How to use links in html | open link in another tab in html | Learn HTML5





This video demonstrate how to use links in html and how to open link in another tab in html. Anchor tag is used to make links and target blank is use to open link in another tab.

code:

<!DOCTYPE html>
<html>
<head>
<title>HTML Links</title>
</head>
<body>
<a href="https://www.google.com"  target="_blank"> Go to Google <a>

</body>
</html>

Sunday, June 17, 2018

Variable and simple printing with document write in Javascript | Learn J...





This video demonstrate how to make variable in javascript and how to print with document write method in javascript.

Function in Javascript easy learning | Learn Javascript





This video demonstrate how to write a function in javascript in very easy way. A function is called on onload event which displays an alert  box.

Inline, Header and External Javascript | Learn Javascript





This video demonstrate how to write inline javascript, header javascript and external javascript.

Thursday, June 14, 2018

How to use color in html | Learn HTML5





This video demonstrate how to use color in html in very easy way.

we use css style attribute in html to make colourful headings.



code:

<!DOCTYPE html>

<html>

<head>

<title>using color</title>

</head>

<body>

<h2 style="color:blue;background-color:yellow;"> Testing color </h2>



<h3 style="color:green;background-color:violet;"> Testing color</h3>

</body>

</html>

Writing comment in html in very easy way | Learn HTML5





This video demonstrate how to write comment in html. Writing comment in html is very easy after watching this tutorial.



code:

<!DOCTYPE html>

<html>

<head>

<title>Comment in html</title>

</head>

<body>

<!--

This is a comment which is invisible in output of page but useful for hints and making notes about something-->

<p>just a paragraph</p>



<p>lets add another</p>



</body>

</html>

Tuesday, June 12, 2018

How to write a quotation in HTML | "quotation" | Learn HTML5





This video demonstrate how to write quotation in html, for eg: "quotation".

<q> tag is used to make quotation in html.



code:

<!DOCTYPE html>

<html>

<head>

<title>quotation</title>

</head>

<body>

<q> It is inside quotation </q>

</body>

</html>

Monday, June 11, 2018

How to use superscript and subscript in html | Learn HTML5





To use superscript in html we use <superscript> tag.

To use subscript in html we use <subscript> tag.



code:

<!DOCTYPE html>

<html>

<head>

<title>Superscript and subscript</title>

</head>

<body>



<p > It is subscript <sub> i am in subscript</sub></p>

<p> X <sup>2</sup> + Y <sup>2 </sup>=10</p>



</body>

</html>

Sunday, June 10, 2018

How to make bold text in HTML | Learn HTML5





To create bold text in html we use a bold tag in this way:

code:

<!DOCTYPE html>

<html>

<head>

<title>Bold Text</title>

</head>

<body>

<p>this is normal text</p>



<p><b> this is bold text </b></p>

</body>

</html>

How to use style or css in HTML | Learn HTML5





To use style or css in html we must use a style tag inside any tags like body or p tag.



code:

<!DOCTYPE html>

<html>

<head>

<title>Styling in html</title>

</head>

<body style="background-color: red;color:blue;">

noting here

</body>

</html>

Creating a Button in HTML in very easy way | Learn HTML5





To create a button in html, we need a button tag. Between opening button tag and closing button tag you need to put the caption of button. Here style is optional.



code:



<!DOCTYPE html>

<html>

<head>

<title>Creating Button</title>

</head>

<body>

<button style="background-color: green;">Click Me</button>

</body>

</html>

Friday, June 8, 2018

Breaking a line in HTML | AspHero





This video demonstrate how to break a line using <br> tag and <p> tag.

Normally paragraph tag break in a paragraph style, where as break tag can break anywhere we want.



code:

<!DOCTYPE html>
<html>
<head>
<title>Break a line</title>
</head>
<body>
<p>we have a paragraph here</p>
<p> here is another paragraph</p>

i am just writing normal text i want to break now <br> it is written after break
</body>
</html>