Thursday, 12 January 2023

Example of Inserting The Table HTML

 HTML CODE

<table>

  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
</table
<table>
<tr>
<td>Emil</td   <td>Tobias</td>
<td>Linus</td></tr
</table>
<table>
  <tr>
    <td>Emil</td>
    <td>Tobias</td>
    <td>Linus</td>
  </tr>
  <tr>
    <td>16</td>
    <td>14</td>
    <td>10</td>
  </tr>
</table>
<table>
  <tr>
    <th>Person 1</th>
    <th>Person 2</th>
    <th>Person 3</th>
  </tr>
  <tr>
    <td>Emil</td>
    <td>Tobias</td>
    <td>Linus</td>
  </tr>
  <tr>
    <td>16</td>
    <td>14</td>
    <td>10</td>
  </tr>
</table>

Share:

Example of Text Formatting HTML

I am showing you example of text formatting  showing below 

html code 

 Formatting elements were designed to display special types of text:

  • <b> - Bold text
  • <strong> - Important text
  • <i> - Italic text
  • <em> - Emphasized text
  • <mark> - Marked text
  • <small> - Smaller text
  • <del> - Deleted text
  • <ins> - Inserted text
  • <sub> - Subscript text
  • <sup> - Superscript text
The HTML <b> element defines bold text, without any extra importance.
<b>This text is bold</b>
<strong>This text is important!</strong>

The HTML <i> element defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.

Tip: The <i> tag is often used to indicate a technical term, a phrase from another language, a thought, a ship name, etc.

<i>This text is italic</i>

he HTML <em> element defines emphasized text. The content inside is typically displayed in italic.

Tip: A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.

<em>This text is emphasized</em>

The HTML <small> element defines smaller text

The HTML <mark> element defines text that should be marked or highlighted:

<p>Do not forget to buy <mark>milk</mark> today.</p>

The HTML <del> element defines text that has been deleted from a document. Browsers will usually strike a line through deleted text

<p>My favorite color is <del>blue</del> red.</p>

The HTML <ins> element defines a text that has been inserted into a document. Browsers will usually underline inserted text

<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>

The HTML <sub> element defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O

<p>This is <sub>subscripted</sub> text.</p>

The HTML <sup> element defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like WWW[1]

<p>This is <sup>superscripted</sup> text.</p>

Share:

Example of Styles HTML

 I am showing you example of html styles 

HTML CODE

tagname style="property:value;">

<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>

<body>

<h1 style="background-color:powderblue;">This is a heading</h1>
<p style="background-color:tomato;">This is a paragraph.</p>

<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</

<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>

<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>

<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>

Share:

Example of Paragraphs HTML

 I am showing you example of simple paragraphs

HTML CODE


<p>

This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>

<p>
This paragraph
contains         a lot of spaces
in the source         code,
but the        browser
ignores it.
</p>
<h1>This is heading 1</h1>
<p>This is some text.</p>
<hr>
<h2>This is heading 2</h2>
<p>This is some other text.</p>

<hr>

<p>This is<br>a paragraph<br>with line breaks.</p>

<p>
  My Bonnie lies over the ocean.

  My Bonnie lies over the sea.

  My Bonnie lies over the ocean.

  Oh, bring back my Bonnie to me.
</p>

<pre>
  My Bonnie lies over the ocean.

  My Bonnie lies over the sea.

  My Bonnie lies over the ocean.

  Oh, bring back my Bonnie to me.
</pre>

Share:

Headings HTML

 <h1>Heading 1</h1>

<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<h1 style="font-size:60px;">Heading 1</h1>
Share:

Nested Elements HTML

 <!DOCTYPE html>

<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<h1>My First Heading</h1>
<p>My first paragraph.</p>

Share:

File Upload HTML

 HTML CODE

<div class="wrapper">

  <div class="container">

    <h1>Upload a file</h1>

    <div class="upload-container">

      <div class="border-container">

        <div class="icons fa-4x">

          <i class="fas fa-file-image" data-fa-transform="shrink-3 down-2 left-6 rotate--45"></i>

          <i class="fas fa-file-alt" data-fa-transform="shrink-2 up-4"></i>

          <i class="fas fa-file-pdf" data-fa-transform="shrink-3 down-2 right-6 rotate-45"></i>

        </div>

        <!--<input type="file" id="file-upload">-->

        <p>Drag and drop files here, or 

          <a href="#" id="file-browser">browse</a> your computer.</p>

      </div>

    </div>

  </div>

</div>

CSS CODE

* {

  box-sizing: border-box;

  -moz-box-sizing: border-box;

  -webkit-box-sizing: border-box;

}


body {

  font-family: 'Montserrat', sans-serif;

  background: #535c68;

}


.wrapper {

  margin: auto;

  max-width: 640px;

  padding-top: 60px;

  text-align: center;

}


.container {

  background-color: #f9f9f9;

  padding: 20px;

  border-radius: 10px;

  /*border: 0.5px solid rgba(130, 130, 130, 0.25);*/

  /*box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1), 

              0 0 0 1px rgba(0, 0, 0, 0.1);*/

}


h1 {

  color: #130f40;

  font-family: 'Varela Round', sans-serif;

  letter-spacing: -.5px;

  font-weight: 700;

  padding-bottom: 10px;

}


.upload-container {

  background-color: rgb(239, 239, 239);

  border-radius: 6px;

  padding: 10px;

}


.border-container {

  border: 5px dashed rgba(198, 198, 198, 0.65);

/*   border-radius: 4px; */

  padding: 20px;

}


.border-container p {

  color: #130f40;

  font-weight: 600;

  font-size: 1.1em;

  letter-spacing: -1px;

  margin-top: 30px;

  margin-bottom: 0;

  opacity: 0.65;

}


#file-browser {

  text-decoration: none;

  color: rgb(22,42,255);

  border-bottom: 3px dotted rgba(22, 22, 255, 0.85);

}


#file-browser:hover {

  color: rgb(0, 0, 255);

  border-bottom: 3px dotted rgba(0, 0, 255, 0.85);

}


.icons {

  color: #95afc0;

  opacity: 0.55;

}

JS CODE

$("#file-upload").css("opacity", "0");


$("#file-browser").click(function(e) {

  e.preventDefault();

  $("#file-upload").trigger("click");

});


Share:

AngularJS Simple Login Page HTML

HTML CODE

<div class="container" ng-app="myApp">

  <div class="row">

    <div class="col-md-12">

      <div class="page-header">

        <h1>{{ title }}</h1>

      </div>

    </div>

    

    <div ui-view></div>

    

  </div>

  

  <script type="text/ng-template" id="login.html">

    <div class="col-md-12">

      <h3>Login Page</h3>

      

      <form ng-submit="formSubmit()" class="form">

        <div class="col-md-4">

          <div class="form-group">

            <input type="text" class="form-control" ng-model="username" placeholder="username" required=""/>

          </div> 


          <div class="form-group">

            <input type="password" class="form-control" ng-model="password" placeholder="password" required=""/>

          </div>


          <div class="form-group">

            <button type="submit" class="btn btn-success">Login</button>

            <span class="text-danger">{{ error }}</span>

          </div>


        </div>

      </form>

    </div>

  </script>

  

  <script type="text/ng-template" id="home.html">

    <div class="col-md-12">

      <h3>Home Page</h3>

    

      <a ui-sref="login">Back</a>

    </div>

  </script>

</div>

JS CODE 

(function() {

  var app = angular.module('myApp', ['ui.router']);

  

  app.run(function($rootScope, $location, $state, LoginService) {

    $rootScope.$on('$stateChangeStart', 

      function(event, toState, toParams, fromState, fromParams){ 

          console.log('Changed state to: ' + toState);

      });

    

      if(!LoginService.isAuthenticated()) {

        $state.transitionTo('login');

      }

  });

  

  app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {

    $urlRouterProvider.otherwise('/home');

    

    $stateProvider

      .state('login', {

        url : '/login',

        templateUrl : 'login.html',

        controller : 'LoginController'

      })

      .state('home', {

        url : '/home',

        templateUrl : 'home.html',

        controller : 'HomeController'

      });

  }]);


  app.controller('LoginController', function($scope, $rootScope, $stateParams, $state, LoginService) {

    $rootScope.title = "AngularJS Login Sample";

    

    $scope.formSubmit = function() {

      if(LoginService.login($scope.username, $scope.password)) {

        $scope.error = '';

        $scope.username = '';

        $scope.password = '';

        $state.transitionTo('home');

      } else {

        $scope.error = "Incorrect username/password !";

      }   

    };

    

  });

  

  app.controller('HomeController', function($scope, $rootScope, $stateParams, $state, LoginService) {

    $rootScope.title = "AngularJS Login Sample";

    

  });

  

  app.factory('LoginService', function() {

    var admin = 'admin';

    var pass = 'pass';

    var isAuthenticated = false;

    

    return {

      login : function(username, password) {

        isAuthenticated = username === admin && password === pass;

        return isAuthenticated;

      },

      isAuthenticated : function() {

        return isAuthenticated;

      }

    };

    

  });

  

})();

Share:

Bootstrap Login Page HTML

 HTML CODE


    <div class="container">

        <div class="row">

            <div class="col-lg-3 col-md-2"></div>

            <div class="col-lg-6 col-md-8 login-box">

                <div class="col-lg-12 login-key">

                    <i class="fa fa-key" aria-hidden="true"></i>

                </div>

                <div class="col-lg-12 login-title">

                    ADMIN PANEL

                </div>


                <div class="col-lg-12 login-form">

                    <div class="col-lg-12 login-form">

                        <form>

                            <div class="form-group">

                                <label class="form-control-label">USERNAME</label>

                                <input type="text" class="form-control">

                            </div>

                            <div class="form-group">

                                <label class="form-control-label">PASSWORD</label>

                                <input type="password" class="form-control" i>

                            </div>


                            <div class="col-lg-12 loginbttm">

                                <div class="col-lg-6 login-btm login-text">

                                    <!-- Error Message -->

                                </div>

                                <div class="col-lg-6 login-btm login-button">

                                    <button type="submit" class="btn btn-outline-primary">LOGIN</button>

                                </div>

                            </div>

                        </form>

                    </div>

                </div>

                <div class="col-lg-3 col-md-2"></div>

            </div>

        </div>


CSS CODE

body {

    background: #222D32;

    font-family: 'Roboto', sans-serif;

}


.login-box {

    margin-top: 75px;

    height: auto;

    background: #1A2226;

    text-align: center;

    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);

}


.login-key {

    height: 100px;

    font-size: 80px;

    line-height: 100px;

    background: -webkit-linear-gradient(#27EF9F, #0DB8DE);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

}


.login-title {

    margin-top: 15px;

    text-align: center;

    font-size: 30px;

    letter-spacing: 2px;

    margin-top: 15px;

    font-weight: bold;

    color: #ECF0F5;

}


.login-form {

    margin-top: 25px;

    text-align: left;

}


input[type=text] {

    background-color: #1A2226;

    border: none;

    border-bottom: 2px solid #0DB8DE;

    border-top: 0px;

    border-radius: 0px;

    font-weight: bold;

    outline: 0;

    margin-bottom: 20px;

    padding-left: 0px;

    color: #ECF0F5;

}


input[type=password] {

    background-color: #1A2226;

    border: none;

    border-bottom: 2px solid #0DB8DE;

    border-top: 0px;

    border-radius: 0px;

    font-weight: bold;

    outline: 0;

    padding-left: 0px;

    margin-bottom: 20px;

    color: #ECF0F5;

}


.form-group {

    margin-bottom: 40px;

    outline: 0px;

}


.form-control:focus {

    border-color: inherit;

    -webkit-box-shadow: none;

    box-shadow: none;

    border-bottom: 2px solid #0DB8DE;

    outline: 0;

    background-color: #1A2226;

    color: #ECF0F5;

}


input:focus {

    outline: none;

    box-shadow: 0 0 0;

}


label {

    margin-bottom: 0px;

}


.form-control-label {

    font-size: 10px;

    color: #6C6C6C;

    font-weight: bold;

    letter-spacing: 1px;

}


.btn-outline-primary {

    border-color: #0DB8DE;

    color: #0DB8DE;

    border-radius: 0px;

    font-weight: bold;

    letter-spacing: 1px;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);

}


.btn-outline-primary:hover {

    background-color: #0DB8DE;

    right: 0px;

}


.login-btm {

    float: left;

}


.login-button {

    padding-right: 0px;

    text-align: right;

    margin-bottom: 25px;

}


.login-text {

    text-align: left;

    padding-left: 0px;

    color: #A2A4A4;

}


.loginbttm {

    padding: 0px;

}



Share:

Absolute Center Login Page with Bootstrap HTML

 HTML CODE

<div class="container">

  <div class="row">

    <div class="Absolute-Center is-Responsive">

      <div id="logo-container"></div>

      <div class="col-sm-12 col-md-10 col-md-offset-1">

        <form action="" id="loginForm">

          <div class="form-group input-group">

            <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>

            <input class="form-control" type="text" name='username' placeholder="username"/>          

          </div>

          <div class="form-group input-group">

            <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>

            <input class="form-control" type="password" name='password' placeholder="password"/>     

          </div>

          <div class="checkbox">

            <label>

              <input type="checkbox"> I agree to the <a href="#">Terms and Conditions</a>

            </label>

          </div>

          <div class="form-group">

            <button type="button" class="btn btn-def btn-block">Login</button>

          </div>

          <div class="form-group text-center">

            <a href="#">Forgot Password</a>&nbsp;|&nbsp;<a href="#">Support</a>

          </div>

        </form>        

      </div>  

    </div>    

  </div>

</div>

CSS CODE

body{

  background: #00589F;

  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00589F', endColorstr='#0073CF', GradientType=0);

  background: -webkit-linear-gradient(to bottom, #00589F 50%, #0073CF) !important;

  background: -moz-linear-gradient(to bottom, #00589F 50%, #0073CF) !important;

  background: -ms-linear-gradient(to bottom, #00589F 50%, #0073CF) !important;

  background: -o-linear-gradient(to bottom, #00589F 50%, #0073CF) !important;

  background: linear-gradient(to bottom, #00589F 50%, #0073CF) !important;

  color: white;

}


div.well{

  height: 250px;


.Absolute-Center {

  margin: auto;

  position: absolute;

  top: 0; left: 0; bottom: 0; right: 0;

}


.Absolute-Center.is-Responsive {

  width: 50%; 

  height: 50%;

  min-width: 200px;

  max-width: 400px;

  padding: 40px;

}


#logo-container{

  margin: auto;

  margin-bottom: 10px;

  width:200px;

  height:30px;

  background-image:url('http://placehold.it/200x30/000000/ffffff/&text=BRAND+LOGO');

}

Share: