Wednesday, December 26, 2018

What is HTTPS ?

What is HTTPS ?


HTTPS stand for Hypertext Transfer Protocol Secure. It is the Secure version of HTTP, the Protocol over which data is sent between your browser and the website that you are connect. Secure means Encrypt information sent between browser and server.

What is HTTP ?

What is HTTP ?


HTTP stand for Hypertext Transfer Protocol. It is an application level protocol for distribute , collaboration, hypertext information system.

Tuesday, December 25, 2018

Class Attribute In JavaScript

Class Attribute In JavaScript


JavaScript can access element with a specified className by using the getElementsByClass() method.

Example:

<!DOCTYPE html>
<html>
<body>

<h2>Using The class Attribute in JavaScript</h2>
<p>Click the button, to hide all elements with the class name "city", with JavaScript:</p>

<button onclick="myFunction()">Hide elements</button>

<h2 class="city">Delhi</h2>
<p>Delhi   is the capital of India.</p>

<h2 class="city">Kathmandu</h2>
<p>Kathmandu is the capital of Nepal.</p>

<h2 class="city">Dhaka</h2>
<p>Dhaka is the capital of Bangladesh.</p>

<script>
function myFunction() {
  var x = document.getElementsByClassName("city");
  for (var i = 0; i < x.length; i++) {
    x[i].style.display = "none";
  }
}
</script>

</body>
</html>
Result:

Using The class Attribute in JavaScript

Click the button, to hide all elements with the class name "city", with JavaScript:

Hide elements

Delhi is the capital of India.

Kathmandu is the capital of Nepal.

Dhaka is the capital of Bangladesh.

Another example of class Attribute


Another example of class Attribute


Using tree div elements that point to the same class name.

<!DOCTYPE html>
<html>
<head>
<style>
.cities {
background-color: black;
color: white;
margin:20px;
padding:20px;
}
</style>
</head>
<body>
<div class="cities">
<h2>Delhi</h2>
<p> Delhi is the captical of India</p>
</div>

<div class="cities">
<h2>Kathmandu</h2>
<p> Kathmandu is the captical of Nepal</p>
</div>

<div class="cities">
<h2>Dhaka</h2>
<p> Dhaka is the captical of Bangladesh</p>
</div>

</body>
</html>
 Result:

Delhi

Delhi is the captical of India

Kathmandu

Kathmandu is the captical of Nepal

Dhaka

Dhaka is the captical of Bangladesh

Class Attribute In HTML

Class Attribute In HTML

The class is an attribute which specifies one or more class names for an HTML element. The class name can be used by CSS and JavaScript to do some tasks for HTML elements.

A class attribute can be define within <style> tag or separate file using (.) character.

Example:

<!DOCTYPE html>
<html>
<head>
<style>
  .headings {
  color: Tomato;
  font-family: Verdana;
  background-color: black;
}
</style>
</head>
<body>

<h1 class="headings">This is first Heading</h1>
<h2 class="headings">This is first Heading</h2>
<h3 class="headings">This is first Heading</h3>
<h4 class="headings">This is first Heading</h4>

</body>
</html>

Result:

This is first Heading
This is first Heading
This is first Heading

This is first Heading

Tags:

Class Attribute In HTML, HTML

What is WWW?


What is WWW?

WWW stand for World Wide Web, invented by Tim Berners Lee in 1989. Definition is all the resources and users on the internet that using the Hypertext Transfer protocol (HTTP).

What is website?


What is website?

A website is a collection of web pages.

Web page is what you see on the screen when you type in a web address (Domain) , then rend content.

Websites contain any type of information like text, image, video, audio etc.