ad

Tuesday, January 28, 2025

Top 20 HTML MCQ With Answers(part 3)


 Top 20 HTML  MCQ With Answers


Top 20 HTML  MCQ With Answers


1] What does "WWW" stand for?

a) World Wide Web
b) World Wide Windows
c) Web Wide World
d) Web World Wide

Answer: a]  World Wide Web

2] Which protocol is used to retrieve emails?

a) POP3
b) SMTP
c) IMAP
d) a) and c)

Answer: d] a and c

3] Who is credited as the inventor of the World Wide Web?

a) Bill Gates
b) Tim Berners-Lee
c) Steve Jobs
d) Larry Page

Answer: b]  Tim Berners-Lee

4] What is the primary protocol used by the World Wide Web?

a) HTTP
b) FTP
c) SMTP
d) POP3

Answer: a]  HTTP

5] Which device connects a local network to the Internet?

a) Router
b) Switch
c) Modem
d) Firewall

Answer: a] Router

6] Which organization governs the development of web standards?

a) ISO
b) W3C
c) IEEE
d) ICANN

Answer: b) W3C

7] Which of the following is a valid domain extension?

a) .web
b) .com
c) .doc
d) .exe

Answer: b) .com

8] What does "DNS" stand for?

a) Domain Name System
b) Data Network System
c) Domain Network Service
d) Distributed Name Server

Answer: a) Domain Name System

9] What is the default port number for HTTP?

a) 20
b) 80
c) 31
d) 443

Answer: b) 80

10] What is a hyperlink?

a) A highlighted word or phrase that links to another web page
b) A search engine feature
c) A link to a local file
d) A command used to open a browser

Answer: a) 
a) A highlighted word or phrase that links to another web page


11] Which of the following is a search engine?

a) Bing
b) Edge
c)Firefox
d) Windows

Answer: a)  Bing

12] Which of the following is an IP address format?

a) 192.168.1.1
b) www.example.com
c) 257.257.256.257
d) http://192.168.1.17

Answer: a)  a) 192.168.1.1

13]  What is  IPv6 ?

a)  A type of URL
b) A protocol for file transfer
c)  web browser
d) The newest version of the Internet Protocol 

Answer: d] The newest version of the Internet Protocol 

14]  What does "VPN" stand for?

a) Virtual Private Network
b) Virtual Personal Node
c) Virtual Public Network
d)Verified Private Network
 

Answer: a] Virtual Private Network

15]  What is web hosting ?

a) Storing and serving websites
b)  Securing web traffic
c) Designing web pages
d) Managing search engines

Answer: a] Storing and serving websites

16]  What does SSL  stand for?

a) Secure Sockets Layer
b) Secure System Link
c) Secure Search Link
d) System Secure Layer

Answer: a) Secure Sockets Layer

17] What is  HTTP 404 ?

a) File not found
b) Connection timeout  
c) Server not responding
d) Server not responding

Answer: a) File not found

18]  What is a web server?

a) A device for connecting to the internet
b) A type of search engine
c) A protocol for transferring data
d) A program that hosts and serves web pages

Answer: d)  A program that hosts and serves web pages

19]  Which tool is used to analyze and debug a website?

a)Firewall
b) FTP Client
c)  Browser Developer Tools
d) Search Engine

Answer: c) Browser Developer Tools

20] What does "ICANN" stand for?

a) Internet Corporation for Assigned Names and Numbers
b) International Corporation for Accessing Network Names
c) Internet Company for Allocation of Network Names
d) International Committee for Assigned Names

Answer: a)  Internet Corporation for Assigned Names and Numbers


Related Post :-

features of javascript

css column gap property program

alphabet triangle pattern

Monday, January 27, 2025

Top 20 HTML MCQ With Answers

 











Top 20 HTML  MCQ With Answers



TOP  20 HTML MCQ with Answers


1)    which of the following is used to create web pages?


    a] c++
    b] php
    c] JVM
    d] HTML

 Answer :-  d] HTML

2)  HTML language is a set markup .....

 
   a] HTML 
   b] Tags 
   c] sets
   d] attributes

Answer :-  b] Tages

3) HTML is considered a .... language

  
 a] Markup language 
 b] programming  langauge 
 c] Markup language
 d] plain text

Answer :-   c] Markup language

4)  HTML  Document contain
 

 a] plain text
 b] tags
 c] Attributes
 d] all  of these

Answer :- d] all  of these

5) html tags are use to describe document
 

 a] definition 
 b] content 
 c] languaage 
 d] plain text

Answer :-  b] content 

6) page designed  in html is called .... 
 

  a]  web page 
  b] server page 
  c] front page 
  d]  blue page

Answer :-   a]  web page 

7)  write html code using ..... select appropriate option(S).


   a] microsoft power  point 
   b] notepad 
   c]  google 
   d] none of these
   
   Answer :- b] notepad 

8)  html document is saved   using ... extension 

  
  a]  html
  b]  .html
  c]  .php 
  d]  .xml 

 Answer :-  .html

9) Basic fundamental block is called ------ 

 
  a] html body 
  b] html tag
  c] html element 
  d] html attribute

Answer :- html tag 

10)  Which of the following is not  difference between HTML and XHTML?

    a] Charset in both html and xhtml is “text/html”
   b] Tags and attributes are case-insensitive in HTML but not in XHTML
   c] Special characters must be escaped using character entities in XHTML unlike HTML
   d] Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”

   Answer:  a]  Charset in both html and xhtml is “text/html”

  11)  What is DOM in HTML?

    a] Language dependent application programming
    b] Hierarchy of objects in ASP.NET
    c] Application programming interface
    d] Convention for representing and interacting with objects in html documents

       Answer: d]  Convention for representing and interacting with objects in html documents

   12) Which of the following tag is use for inserting the largest heading in HTML

     a] head
     b] <h1>
     c] <h6>
     d] heading
         

        Answer: b] <h1>

  13) which part of  HTML metadata is contained

  a] head tag
  b] title tag
  c] html tag
 d] body tag
 

 Answer: a] head tag

 14)  What is DOM in HTML

   a] Language dependent application programming
   b] Hierarchy of objects in ASP.NET
   c] Application programming interface
   d] Convention for representing and interacting with objects in html documents

      Answer: d] Convention for representing and interacting with objects in html documents

  18)  Which element is use to get highlighted text in HTML5

    a] <u>
    b] <mark>
    c] <highlight>

      Answer: b] <mark>

  19)  Which of the elements in HTML5 defines video or movie conten

     a) <video>
     b) <movie>
     c)<media>
     d)  <audio>

    Answer: a] <video>

  20) Which of the following is not a HTML5 tag?

     a] <track>
     b] <video>
     c] <slider>
    d] <source>
    

    Answer: c]  <slider>


Related Post :-

html head tag

Saturday, October 5, 2024

Top 20 HTML MCQ with Answers (part 1)

                TOP  20 HTML MCQ with Answers

TOP  20 HTML MCQ with Answers

1]  What  is HTML stand for?

     a] Hyper transfer markup language
     b] Hyper Text Markup language
     c] Hyper test Markup langauge
     d] Hyper text Markup langauge
 
Answer : b] Hyper text Markup language

2]  HTML  element for the largest heading?
    
    a) <head>
    b) <h6>
    c)  <h1>
    d)  <h4>

 Answer : c) <h1>

3] HTML element for insert line break?
  
  a) <br>
  b) < line>
  c) <insert>
  d) <break>

 Answer :  a) <br>

4] Syntax HTML comment?
 
a)  //comment
b)  #comment
c)  /* comment*/
d)  <!--comment-->

Answer : - d)  <!--comment-->

5] which html tag element defines title of the document?
  
  a) <html>
  b)  <head>
  c) <meta>
  d) <title>

 Answer : -  d) <title>

6] HTML for creating a hyperlink?

  a) <a href="http://www.example.com">example</a>
  b) <a src="http://www.example.com  >example</a>
  c) <a href="http://www.example.com >example</a>
  d)  <a href= http://www.example.com >example</a>

Answer :- a) <a href="http://www.example.com">example</a>


7)  HTML  tag is called the root element of html?

  a) <title> 
  b) <head>
  c) <html>
  d) <body>

Answer :-   c) <html>

8) HTML is case sensitive ?
  
 a) Yes
  b) No

 Answer :-   b) No

9) which of the properties is used to change the font  of text?
 
  a) font-family
  b) font-size
  c) none 
  b) text-align

Answer :-   a) font-family

10) Create HTML page?

 a) web Browser
 b) a text editor
 c) A ans B Both
 d) none

Answer :-   c) A ans B Both

11) which property is used set border colors in html ?
 
 a) border
 b) border-color
 c) both  A &B
 d) none of the above

Answer :-   b) border-color

12)  which property is used to set colors in html?

a) font-color 
b) background-color
c) color
d) text-color

Answer : - c) color

13) what tag is used to render an image on a webpage?

 a) img
 b) image
 c)  src
 d) none
 
Answer :   a) img

14) what  attribute is used provide a unique name html element?

a) class
b) id 
c) type 
d) none

Answer :  b) id 

15) what   html tag used set up javascript client-side scriping language ?

 a) <anchor>
 b) <script>
 c) <select>
 d) none
 
Answer :   b) <script>

16)  block-level elements in html?

 a)  <p>
 b) <h1>
 c) <div>
 d) all above

Answer :  d) all above

 17)  color are defined HTML using?
  
   a) RGBA values
   b) RGB values
   c) HEX values 
   d) all  of the above 

Answer :  d) all  of the above 

18)  How are quotations defined in html?

 a) <blockquote>
 b) <block>
 c) <quote>
 d)  none

Answer :   a) <blockquote>

19)  how many characters can be written in 1KB?

 a) 1048
 b) 1024
 c)  100
 d) 1058

Answer :  a) 1048

20) how many sizes of headers available in HTML by default?
 
 a) 4
 b) 6
 c) 1
 d) 3

Answer :  b) 6


Related Post :-

php data type


Sunday, August 18, 2024

Objects in JavaScript



Introduction to javascript Classes


what is a JavaScript Object? 

javascript  objects, divide code into logical sections and group together similar data. Primitive values and reference values are terms used in JavaScript. Primitive values include Number, Boolean, Null, Undefined, Strings, and Symbol; reference values include things like DOM nodes, Arrays

What is an object? 

An object in JavaScript is a grouping of linked information and features. Key-value pairs are used to store this data, with each key—also referred to as a property name having a distinct value assigned to it. object values might be functions, other objects, strings, or even integers. In essence, a JavaScript object is much like any other real-world object, such as a person, a home, or an automobile, each with unique traits and actions.

 Example :-

let car =

{

name :"safari",

color : "royale blue",

price:" 15 lakh to 25 lakh",

year:"2024",

model:"xz+",

start:function() {

console.log("car started");

}

};

This example car object five properties - name, color, price, year, model key-value paire keys strings("name","model","year","color","price") value are "safari", "xz+" and 2024 , respectively.   five property, start 

Why Use Objects?

Objects are very helpful because they allow us to combine related functions and data into one clear unit. This approach helps reduce complexity in our code and makes it easier to understand and organize, especially in larger systems. 

For example, if you are developing a website that needs to manage user data, you can store each user's details—like name, email address, and age—in an object. This way, you can easily access and change the user's data without handling many different variables.  

example :-

let user = {

name : "geeta",

email : "geeta@gmail.com",

age : 40,

user greet:function()

{

console.log('hi');

}

};

user object store the user name, email,age  with user greet method prints.

 creating and using objects

create a object using object literal. object properties 'title','author','year'. & method details


Example  :


let  book ={
title : ' data structure';
author: ' lipschute' ;
Price: 500 ;

};
C++ robort lafore  600

Modifying Objects :-

 modify existing ones or even delete properties.

Example :-

book.title =' C++'; //modify existing property

book.subject = 'program';//add new property

delete book.proce; / /remove property

Syntax :-

let objectName = {

key1:value1,
key2:value2,
//more key-value pairs

};

Example :-

let  book ={
title : ' data structure';
author: 'Narasimha Karumanchi ' ;
Price: 500 ;

};

Explanation  :-

book is the object name.

title,author, and  price properties of object.

data structire, Narasimha Karumanchi, and   500 values


JavaScript Object Characteristics  

1.  JavaScript objects are a basic part of the language. They provide a strong way to store and manipulate data. Understanding the features of JavaScript objects is essential for becoming skilled in JavaScript. In the next sections, we will look at the main characteristics that define JavaScript objects.

 2 . Key-Value Pairs At the heart of every JavaScript object is the idea of key-value pairs. An object can be seen as a collection of these pairs, where each key, also known as a property, is connected to a specific value.

  • Keys: The names of the properties, which can be shown as strings or symbols.

  • Values: The data linked to the keys, which can be any type, including strings, numbers, arrays, functions, or even other objects.

Example:

let book = {

  name: "data structure",

  Price: 500 ;

  isbook: true

};


Benefits of Using Objects in JavaScript

. JavaScript objects are essential features of the language. They provide developers with important tools. Whether you are creating basic scripts or complex web applications, using objects can significantly enhance your coding performance. Here are some of the key benefits of using objects in JavaScript.

1.Organization of data

 The main advantage of objects is their ability to organize data in a clear and logical way. By grouping related data, objects improve the readability and maintainability of your code.

 2. Reusability

 Objects enhance code reuse, especially when combined with functions or classes. By creating objects with data and services, you can easily reuse and extend them in your application.

 3. Sequence and prototype chain

 JavaScript objects use prototype properties, allowing them to inherit properties and methods from other objects. This feature helps create hierarchical systems and shared functionality between components.

 4. Dynamic change

 JavaScript objects are robust. You can add, modify, or remove objects and methods in real time. These changes make it easier to meet your evolving product needs without overhauling your codebase.

 5. Support for JSON

 JavaScript objects work well with JSON, which is a common format for data exchange. This consistency makes it easy to sequence and deserialize data, particularly when interacting with APIs or collecting data.

 6. Easy ways to adapt

 JavaScript provides many built-in methods for manipulating objects, making them simpler to work with. These methods include Object.keys(), Object.values(), Object.entries(), and Object.assign()..  

Conclusions about JavaScript objects

1. A JavaScript object acts as an ordered collection of interrelated data and functions, organized as key-value pairs. These features play an important role in creating sophisticated data structures and applications in JavaScript. Having a solid understanding of how to create, navigate, and manipulate objects will greatly enhance your skills as a JavaScript developer. Whether it’s processing basic data or building complex web applications, customizability is an important milestone in your journey developing with JavaScript.

FAQs :-

1. What is a JavaScript object?

A JavaScript object is a collection of key-value pairs, where each key is a unique identifier (property) that maps to a specific value. Objects can store data types such as strings, numbers, settings, functions, or even other objects.

2. How do you create an object in JavaScript?

There are many ways to do things in JavaScript:

• Object Literal Syntax : Typical method.

JavaScript scripting

Copy the code

ma cart = {

  is: "Toyota", .

  Example: "Corolla", .

  The year is

};

3. How do you get the properties of an object?

You can access the object using dot notation or bracket notation.

• Reference points:

JavaScript scripting

Copy the code

console.log(person.name); 

• Letters in parentheses:

JavaScript scripting

Copy the code

console.log(person["mfe"]);

Dot characters are more common, but parentheses are useful when a property name is dynamic or contains special characters.


5. What is a method used in a JavaScript object?

A method is a function stored as a property of an object. Methods enable objects to work with their data.

For example:

JavaScript scripting

Copy the code

for account = { 1 .

  add: function (a,b) 

{ .

    return a + b;

  } 

};


Related Post :-

html head tag

design web page

basefont tag in html

Wednesday, August 14, 2024

Classes in JavaScript

 
https://webdesigningtheory.blogspot.com/

Introduction to JavaScript Classes



 What is a JavaScript Classes?

1. Utilize the keyword class to define a class. A class serves is the template for creating objectsThe class statement serves as the foundation for creating a JavaScript class. In JavaScript, a class functions as a template for producing objects, encapsulating both data and functions (known as methods) that manipulate that data. Classes enable object-oriented programming (OOP) within JavaScript, a programming paradigm that utilizes objects to represent real-world entities. A class is defined using the class keyword, followed by the name of the class. Inside the class, one can define a constructor method along with other methods.

 Why Utilize Classes in JavaScript?

1. Organization and Structure: 

Classes enhance the organization and structure of code, improving its manageability and maintainability. They allow developers to group related properties and methods into a single entity, which more accurately reflects real-world concepts.

2. Reusability :-

 Classes encourage code reusability by permitting the creation of multiple instances (objects) from a single class definition. This approach reduces code duplication and simplifies the management of modifications across various instances.

3. Encapsulation:

 Classes embody the principle of encapsulation, which involves hiding the internal state of an object while providing a controlled interface for interaction. This method protects the integrity of the data and reduces the risk of unintended interference 

4. Inheritance:

 Classes support inheritance, allowing the development of new classes that inherit properties and methods from existing ones. This feature promotes code reuse and can simplify the implementation of new functionalities by utilizing established capabilities.

 5. Abstraction: 

Classes provide a means to abstract complex systems into more manageable representations. By focusing on the essential characteristics and behaviors of an entity, developers can engage with high-level concepts without being overwhelmed by implementation details.

  6. Improved Readability :-

 The implementation of classes can enhance code readability by establishing a clear structure and delineating various concerns within the code. This clarity makes the codebase more accessible, particularly for teams or new developers who are joining a project.
   
7. Standardization:

 The introduction of class syntax in ES6 (ECMAScript 2015) has provided JavaScript with a more standardized approach to object creation and class definition, aligning it with other programming languages that support object-oriented programming principles.


 Class Syntax :-


          class ClassName {
  constructor() { ... }
}
  
Class Declarations :-
        A class declaration represents a conventional method for defining a class, akin to the declaration of functions. It employs the class keyword followed by the designated class name.


Syntax

class ClassName {
  constructor(parameters) {
    // Initialization code
  }
 
  methodName() {
    // Method code
  }
}
 

  Benefits of Using Classes :-


1] Encapsulation:
Classes enable the grouping of related data and functions into a single entity, thereby encapsulating them. This encapsulation contributes to a more organized and modular code structure, enhancing understandability and maintainability.

Clearer Structure:

 Classes offer a definitive framework for object creation, outlining properties and methods, which aids in establishing a more coherent and logical codebase.

     
2] Instantiation: 

Multiple instances of a class can be generated, each possessing its own state, without necessitating code duplication. This fosters code reuse and consistency throughout the application.


• Inheritance:

 Classes facilitate inheritance, permitting the extension of existing classes to formulate new ones with additional or altered behaviors. This minimizes code duplication and streamlines the implementation of new features.


3] Maintainability

 • Separation of Concerns :- Classes assist in segregating various components of an application, simplifying the process of isolating and rectifying bugs or implementing changes without impacting unrelated elements.

• Easier Refactoring :-   A well-defined class structure allows for more straightforward refactoring processes.

4.] Encapsulation and Data Hiding

• Controlled Access:  Classes have the capability to limit access to specific properties and methods, thereby offering a regulated interface for interacting with an object. This mechanism safeguards the internal state of an object from inadvertent alterations.

• Private Fields: 

The introduction of private class fields in JavaScript enhances data encapsulation, ensuring that sensitive information remains concealed from external access

5]  Abstraction

• Simplified Interfaces :- Classes enable the abstraction of intricate functionalities behind straightforward interfaces, permitting developers to engage with objects without requiring insight into the underlying implementation specifics.

 • Focus on High-Level Design:

 Utilizing classes allows for an emphasis on the design of high-level components within an application, thereby representing real-world concepts and behaviors in a more intuitive manner.


7] Improved Readability and Consistency


 • Standardized Syntax : - 
The class syntax established in ES6 offers a more recognizable and uniform approach to defining objects and their behaviors, aligning JavaScript with other object-oriented programming languages such as Java and Python.

• Easier Collaboration:   A well-organized class-based code structure facilitates collaborative efforts among teams, as it establishes clear protocols for defining objects and their interactions. 

8] Performance Benefits
 • Prototype-Based Inheritance :- JavaScript classes serve as syntactic sugar over the existing prototype-based inheritance framework, enabling efficient object creation and method sharing among instances.
 
Conclusion :-

Conclusion on JavaScript Classes
JavaScript classes provide a modern and structured way to implement object-oriented programming (OOP) concepts, bringing several benefits to developers working on complex applications. By using classes, developers can:Encapsulate Data and Behavior: Classes group related data and functions together, creating well-defined objects that encapsulate both state and behavior. This leads to cleaner and more organized code. The class statement serves as the foundation for creating a JavaScript class. In JavaScript, a class functions as a template for producing objects, encapsulating both data and functions (known as methods) that manipulate that data. Classes enable object-oriented programming (OOP) within JavaScript, a programming paradigm that utilizes objects to represent real-world entities. A class is defined using the class keyword, followed by the name of the class. Inside the class

Why Utilize Classes in JavaScript?

1. Organization and Structure  :-  Classes enhance the organization and structure of code, improving its manageability and maintainability. They allow developers to group related properties and methods into a single entity, which more accurately reflects real-world concepts.

2. Reusability :-   Classes encourage code reusability by permitting the creation of multiple instances (objects) from a single class definition. This approach reduces code duplication and simplifies the management of modifications across various instances.

3. Encapsulation :-   Classes embody the principle of encapsulation, which involves hiding the internal state of an object while providing a controlled interface for interaction. This method protects the integrity of the data and reduces the risk of unintended interference.

 4. Inheritance :   Classes support inheritance, allowing the development of new classes that inherit properties and methods from existing ones. This feature promotes code reuse and can simplify the implementation of new functionalities by utilizing established capabilities.

 5. Abstraction :-   Classes provide a means to abstract complex systems into more manageable representations. By focusing on the essential characteristics and behaviors of an entity, developers can engage with high-level concepts without being overwhelmed by implementation details.

FAQs :-

1]   What is a class in JavaScript?
Answer : A class in JavaScript serves as a template for creating objects, encapsulating both data and the methods that manipulate that data. It facilitates the definition and creation of reusable components that share common attributes and behaviors.

2]    What is the difference between a method and a static method?

Answer: A method is a function defined within a class that operates on instances of that class and can access instance properties through the this keyword. In contrast, a static method, which is defined using the static keyword, is associated with the class itself rather than any specific instance. Static methods are typically utilized for utility functions pertinent to the class:


Related Post :-

php program to print alphabet

abbr tag in html

background image html program