Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

April 30, 2022

Top 20 Bootstrap Interview Questions and Answers

 

Bootstrap is a comprehensive toolkit for generating and developing web pages and applications that contains HTML, CSS, and JavaScript tools. It is a free and open-source project available on GitHub that was created by (and for) Twitter.
Bootstrap gained a lot of traction after it was made open-source in 2011, and for good reason. Because of its versatility and ease of use, Bootstrap is popular among web designers and developers. Its main benefits are that it is responsive by design, that it works with a wide range of browsers, that it uses reusable components to offer a consistent design, and that it is simple to use and comprehend. It comes with built-in support for jQuery plugins and a programmatic JavaScript API for rich extensibility via JavaScript. Any IDE or editor, as well as any server-side technology and language, can be utilized with Bootstrap.


Python Interview Questions and Answers


Ques. 1): What is Bootstrap?

Answer:
Bootstrap is a platform for web development based on a front-end framework. It is used to create exceptional responsive designs using HTML, and CSS. These templates are used for forms, tables, buttons, typography, models, tables, navigation, carousels and images. Bootstrap also has Javascript plugins, which are optional. Bootstrap is mostly preferred for developing mobile web applications.


BlockChain interview Questions and Answers


Ques. 2): What is Bootstrap and how does it work?

Answer:

Bootstrap is the most popular open source toolkit for creating mobile responsive, dynamic websites and online applications. It includes HTML, CSS, and JS-dependent templates.

Features:

  • Bootstrap increase development speed
  • Bootstrap is outfitted with a 12-column grid system and a responsive layout for
  • Bootstrap ensures consistency
  • It's future compatibility.
  • Bootstrap provides rich customization features for designing tailor-made websites.
  • Bootstrap provides various advantages of using pre-styled components.
  • Bootstrap containing a simple integration approach to integrate into specialized platforms and frameworks.
  • Bootstrap contains a big list of components needed to develop mobile responsive websites like the navigation bar, drop-down, alerts, badges, labels.
  • It reduces extra efforts of large coding


Python Pandas Interview and Questions


Ques. 3): What is included in the Bootstrap package?

Answer:

Scaffolding: Bootstrap comes with a basic structure that includes a Grid System, link styles, and a background. The section Bootstrap Basic Structure goes over this in depth.

CSS: Bootstrap includes global CSS settings, basic HTML components stylized and improved with extendable classes, and a sophisticated grid system. The section Bootstrap with CSS goes over this in depth.

Over a dozen reusable components are included in Bootstrap, including iconography, dropdowns, navigation, notifications, popovers, and more. The section Layout Components goes through this in depth.

Plugins for JavaScript: Bootstrap includes over a dozen bespoke jQuery plugins. You may easily incorporate all of them or just one at a time. The section Bootstrap Plugins goes over this in depth.

Customize: You can customize Bootstrap's components, fewer variables, and jQuery plugins to get your very own version.


Hadoop Interview Questions and Answers


Ques. 4): What are collapsing elements in Bootstrap?

Answer:

You may collapse any element with Bootstrap collapsing elements without creating any JavaScript code or accordion markup. To use collapsible elements in bootstrap, add data-toggle= "collapse" to the controller element along with a data-target or href to delegate control of a collapsible element automatically. You can also do the same thing with.collapse (options),.collapse ('display'), or.collapse ('hide').


Hyperion Interview Questions and Answers


Ques. 5): What are the advantages of Bootstrap?

Answer:

The following are some advantages of Bootstrap:

  • Bootstrap is simple to use and anyone with a basic understanding of HTML and CSS can get started.
  • Features that adapt to phones, tablets, and desktops: Bootstrap's responsive CSS adapts to phones, tablets, and desktops.
  • A mobile-first strategy: Mobile-first styles are built into the Bootstrap framework.
  • Bootstrap 4 is compatible with all modern browsers, including Chrome, Firefox, Internet Explorer 10+, Edge, Safari, and Opera.


Internet of Things (IOT) Interview Questions and Answers


Ques. 6): How well-versed are you in the Bootstrap Grid System?

Answer:

The Bootstrap Grid System is a responsive, mobile-first grid that scales up to 12 columns as the device or viewport size increases. The system includes predefined classes for simple layout options and powerful mix-ins for developing successful semantic layouts.

In the Bootstrap 4 grid system, there are five classes:

  • .col- for extra small devices, whose screen width is less than 576px.
  • .col-sm- small devices, whose screen width is equal to or greater than 576px.
  • .col-md- medium devices, whose screen width is equal to or greater than 768px.
  • .col-lg- large devices, whose screen width is equal to or greater than 992px.
  • .col-xl- extra large devices, whose screen width is equal to or greater than 1200px.
  • The classes listed above can be combined to build layouts that are more dynamic and adaptable.


Machine Learning Interview Questions and Answers


Ques. 7): Explain why to choose Bootstrap for building the websites?

Answer:

There are few reason why we choose Bootstrap for building websites

Mobile Support: For mobile devices it provides full support in one single file rather than in separate file. It supports the responsive design including adjusting the CSS based on the different types of device, size of the screen etc. It reduces extra effort for developers.

Easy to learn: Writing application in bootstrap is easy if you know CSS and HTML

Browser Support: It supports all the popular browsers like Firefox, Opera, Safari, IE etc.


MySQL Interview Questions and Answers


Ques. 8): In Bootstrap, what are Glyphicons?

Answer:

There could be more than 200 glyphicons in the glyphicons set. It serves as an icon font for our web design projects, and it may be used in buttons, navigation, forms, and buttons, among other things. Only Bootstrap projects can use Glyphicons Halflings for free; otherwise, a licence is required.

Print glyphicon and Envelope glyphicon are two examples of Glyphicon.

The syntax can be used for this Glyphicon is:

<span class="glyphicon glyphicon-name"> </span>


Data Science Interview Questions and Answers


Ques. 9): Explain what pagination in bootstrap is and how they are classified?

Answer:

Pagination is the handling of an unordered list by bootstrap. To handle pagination bootstrap provides following classes

  • .pagination: To get pagination on your page you have to add this class
  • .disabled, .active: Customize links by .disabled for unclickable links and .active to indicate the current page
  • .pagination-Ig, .pagination-sm: Use these classes to get different size item


Edge Computing Interview Questions and Answers


Ques. 10): What is the Scrollspy Bootstrap plugin?

Answer:

Scrollspy is a plugin that allows you to build auto-updating navigation plugin parameters. It allows you to use a scroll position to target certain areas of a web page. The.active class, which can be added to the navbar based scroll position, can be used to accomplish this.


PowerShell Interview Questions and Answers


Ques. 11): What are the features of Bootstrap v4?

Answer:

  • The initial release of bootstrap v4.x was 4.0 and the final release in 2018-2019 is 4.2 ;
  • The toast component is added for showing notifications
  • The spinner component is added for loading
  • The utility class .text-decoration-none is added
  • The bootstrap-grid.css file updates the margin and padding of the grid system
  • The .modal-xl class is used for modals
  • The .font-weight-lighter and .font-weight-bolder are added as utility classes
  • The validation styles for file inputs is added with new features
  • The print feature of dark tables is updated with new quality
  • The new utility class .dropdown-item-text is added for dropdown items
  • The Tooltips supports Shadow DOM
  • The double transitions issue on carousels is improved now.


PHP Interview Questions and Answers


Ques. 12): How many types of classes are used in Bootstrap3 to create a responsive page layout?

Answer:

There are 4 types of bootstrap grid classes. we can create grid column layouts extra small devices like mobile phones to large devices like large desktop screens.

  • .col-xs-* : This class is used for extra small device like smart phone (Size<768px)
  • .col-sm-*: This class is used for small device like tablets (size>=768px)
  • .col-md-*: This class is used for medium device like laptops and small size desktop CRT screen (size >=992px)
  • .col-lg-* : This class is used for large device like flat screen or large size desktop (size>=1200px)


C language Interview Questions and Answers


Ques. 13): What is the grid size in Bootstrap 4?

Answer:

Bootstrap 4 supports 5 tier grid system. The below lists for different screen sizes of device,

1. Extra small <576px :

  • Width container will be auto.
  • Here class prefix is .col-.
  • A number of columns will be 12.
  • It can be nestable.
  • It supports column ordering.

2. Small =576px :

  • Width container will be 540px.
  • Here class prefix is .col-sm-.
  • A number of columns will be 12.
  • It can be nestable.
  • It supports column ordering.

3. Medium =768px :

  • Width container will be 720px.
  • Here class prefix is .col-md-.
  • A number of columns will be 12.
  • It can be nestable.
  • It supports column ordering.

4. Large =992px:

  • Width container will be 960px.
  • Here class prefix is .col-lg-.
  • A number of columns will be 12.
  • It can be nestable.
  • It supports column ordering.

5. Extra large =1200px :

  • Width container will be 1140px.
  • Here class prefix is .col-xl-.
  • A number of columns will be 12.
  • It can be nestable.
  • It supports column ordering.


C++ language Interview Questions and Answers


Ques. 14): What is the definition of Kickstrap?

Answer:

Kickstrap is a product that combines AngularJS with Bootstrap, as well as the JavaScript Package Manager (JSPM). Without the native backend, you may take advantage of the benefits of running an authorised database-driven web application. Kickstrap adheres to the Backend as a Service (BaaS) model by using Firebase.


Unix interview Questions and Answers


Ques. 15): What is the purpose of the Bootstrap breadcrumb?

Answer:

The bootstrap breadcrumb is the greatest way to explain hierarchy-based information on a website. It has a breadcrumb class and is an unordered list. For a Bootstrap breadcrumb, the separator is automatically added up in CSS. Breadcrumbs can be used to display categories, tags, or publishing dates on a blog site. It also displays the current page's hierarchical position.


SQL Server Interview Questions and Answers


Ques. 16): What are the similarities and differences between Sass and Bootstrap?

Answer:

SASS is a language for writing stylesheets and CSS pre-processors. It should be compiled into CSS so that the Web browser can understand it. The files have the. scss extension and are written in SASS. The SASS language is used to write the whole Bootstrap 4 CSS source code.

A SASS compiler, such as A.K.A., is used to compile the Bootstrap 4 CSS files.

A pre-processor is a device that converts data into a more usable The best approach to tweak Bootstrap is through SASS.

 

Ques. 17): In Bootstrap 4, what are cards?

Answer:

Bootstrap 4 replaces panels, wells, and thumbnails with cards. To construct a container, Bootstrap 4 uses the.card and.card-body classes on an element. It uses and adds.card-title to heading elements. text-elements to card-text

Let’ see code,

<div class="container-fluid">

 <div class="card card-body">

 <h4 class="card-title">Name</h4>

 <p class="card-text">My name is Satyaprakash</p>

 <a href="#" class="btn btn-primary">More Detilas>></a>

 </div>

</div>

 

Ques. 18): In Bootstrap, what is the purpose of the affix plugin?

Answer:

Affix is a plugin that attaches a tag to a specific spot on a webpage. It is also possible to turn on and off pinning for the attached tag. Social icons are a prominent example of affix plugins in bootstrap. The scrolling that is fastened begins at one point on a webpage and ends at a place when the scrolling stops for the rest of the page.

 

Ques. 19): What are bootstrap modal plugins and how can I use them?

Answer:

Modal plugins can be used to create a small pop-up window, or child windows can be used to replace the parent window. This dialogue box's main purpose is to deliver user reminders and warnings concerning session timeouts, as well as to receive final configurations to delete or save any data. Bootstrap.js or bootstrap.min.js are necessary for bootstrap modal plugins to function properly.

Modal plugins for Bootstrap can be used to create flexible and intelligent dialogue boxes. Any modal can be closed automatically using the backdrop.

Nested modal is not acceptable in Bootstrap, and only one window can be used at one time in Bootstrap.

 

Ques. 20): What are the different sorts of lists that Bootstrap supports?

Answer:

Bootstrap supports three different forms of lists:

Definition Lists - It contains both and elements. Definition term is a term or phrase that is used to define something. The element's definition is defined by the element.

Ordered Lists — To create a sequential order, this list employs a number as a prefix.

Unordered Lists - This type of list is formatted with bullets and does not follow any particular order. The bullet-style can be eliminated from the unordered list by using the.list-unstyled class. To list all of the items in a single line, use the.list-inline class.

 

 


January 05, 2022

Top 20 Apache Struts 2 Interview Questions and Answers

  

Struts 2 is a Java enterprise application framework for constructing web applications. It was created by the Apache Software Foundation. In the year 2006, it was first released. It's written in the Java programming language. It is cross-platform compatible. It is built on the MVC architecture, which is a software design paradigm for creating applications. Struts 2 includes features such as simplified testability, Ajax support, Thread-safety, and Template support, among others.

Apache Cassandra Interview Questions and Answers

Ques. 1): What exactly is Struts2?

Answer:

Apache Struts2 is a Java web application framework that is free source. The OpenSymphony WebWork framework is the foundation for Struts2. It's a significant improvement over Struts1, making it more adaptable, simple to use, and extendable. Action, Interceptors, and Result pages are the three main components of Struts2.

Struts2 offers a variety of options for creating Action classes and configuring them using struts.xml or annotations. For common jobs, we can make our own interceptors. Struts2 includes a large number of tags and makes use of the OGNL expression language. To render result pages, we can design our own type converters. JSPs and FreeMarker templates can be used as result pages.

 Apache Camel Interview Questions and Answers

Ques. 2): What are some of Struts2's features?

Answer:

Here are some of the fantastic features that can persuade you to use Struts2.

POJO forms and POJO actions − Struts2 has done away with the Action Forms that were an integral part of the Struts framework. With Struts2, you can use any POJO to receive the form input. Similarly, you can now see any POJO as an Action class.

Tag support − Struts2 has improved the form tags and the new tags allow the developers to write less code.

AJAX support − Struts2 has recognised the take over by Web2.0 technologies, and has integrated AJAX support into the product by creating AJAX tags, that function very similar to the standard Struts2 tags.

Easy Integration − Integration with other frameworks like Spring, Tiles and SiteMesh is now easier with a variety of integration available with Struts2.

Template Support − Support for generating views using templates.

Plugin Support − The core Struts2 behaviour can be enhanced and augmented by the use of plugins. A number of plugins are available for Struts2.

Apache Ant Interview Questions and Answers

Ques. 3): What's the difference between Struts 1 and Struts 2?

Answer: 

This is a list of the most common Strut 2 interview questions. The action class in Strut 1 is not a POJO, hence it must inherit the abstract class. An action servlet is used as the front controller. Only JSP is used for the component view. A configuration file can be inserted in the WEB-INF directory in section 1. When processing requests, it makes use of the Request Processor class. Actions and models are separated in Strut 1.

The action class in Strut 2 is a POJO, therefore there's no need to inherit any classes or implement any interfaces. For the view component, it has JSP, free-market, and so on. The function controller in strut 2 is the Struts Prepare and Execute filter. In this, a configuration file must be named as struts.xml and placed inside the classes directory. It uses the concept of Interceptors while processing the request. In strut 2, action and models are combined within the action class.

Apache Tomcat Interview Questions and Answers

Ques. 4): In Struct2, What Is The Use Of Struts.properties?

Answer:

This configuration file allows you to override the framework's default behaviour. In fact, all of the properties in the struts.properties configuration file can be defined in the web.xml using the init-param, as well as in the struts.xml configuration file using the constant tag. However, if you prefer to keep things separate and more struts specific, you can create this file in the WEB-INF/classes folder. The default values configured in default.properties, which is included in the struts2-core-x.y.z.jar distribution, will be overridden by the values configured in this file.

Apache Kafka Interview Questions and Answers

Ques. 5): Explain The Life Cycle Of A Request In Struct2 Application?

Answer :

Following is the life cycle of a request in Struct2 application −

  • User sends a request to the server for requesting for some resource (i.e pages).
  • The FilterDispatcher looks at the request and then determines the appropriate Action.
  • Configured interceptors functionalities applies such as validation, file upload etc.
  • Selected action is executed to perform the requested operation.
  • Again, configured interceptors are applied to do any post-processing if required.
  • Finally the result is prepared by the view and returns the result to the user.

Apache Tapestry Interview Questions and Answers

Ques. 6): What are the inbuilt themes that are provided by strut 2?

Answer:

There are 3 different inbuilt themes:

Simple theme: It is a minimal theme which is having very little content. It means that the text field tag renders the HTML tag without label, validation, error reporting or any other formatting or functionality.

XHTML theme: It is referred to as the default theme used by struts 2 and provides all the basics that a simple theme provides. It adds the other several features like standard two-column table layout for the HTML labels for each of the HTML, validation and error reporting etc.

Css_xhtml theme: This is the theme that provides all the basics that the simple theme provides, and it adds other several features like the standard two-column CSS-based layout and using div tag for HTML struts tags, labels for each of the HTML struts tags and placed according to the CSS style sheet.

Apache Ambari interview Questions & Answers

 Ques. 7): What is internationalization and how does it work?

Answer:

This is one of the most common Struts 2 Interview Questions that is asked during an interview. Localization refers to the process of planning and implementing products and services so that they may be easily modified to specific local languages and cultures, whereas internationalization refers to the act of enabling localization.

Apache Hive Interview Questions & Answers

Ques. 8): What is the difference between an interceptor and a filter?

Answer:

The interceptors are built around struts 2. It runs for all requests that qualify for a servlet filter front controller and can be customised to run extra interceptors for specific action execution. Interceptor methods can be configured to execute or not to execute using exclude and include methods.

Servlet specifications are used to create the filters. Executes on request and non-configurable method calls if the pattern matches.

Apache Spark Interview Questions & Answers

Ques. 9): Explain struts 2's XML-based validation.

Answer:

XML-based validation in Struts 2 adds more validation options, such as email validation, integer range validation, form validation field, expression validation, regex validation, needed validation, string length validation, and necessary string validation, among others. The XML file must be titled 'actionclass'-validation.xml in Struts 2.

Apache NiFi Interview Questions & Answers

Ques. 10): How Does Validation in Struts 2 Work?

Answer:

When the user clicks the submit button, Struts 2 will run the validate method, and if any of the if statements inside the method are true, Struts 2 will call the addFieldError method. Struts 2 will not proceed to invoke the execute method if any errors have been introduced. The Struts 2 framework, on the other hand, will return input as a result of calling the action.

When validation fails and Struts 2 returns input, the view file is redisplayed by the Struts 2 framework. Because we utilised Struts 2 form tags, the error messages will appear directly above the completed form.

These are the error messages we specified in the call to the addFieldError function. The addFieldError method takes two arguments. The first is the form field name to which the error applies and the second is the error message to display above that form field.

 

Ques. 11): What Types Of Validations Are Available In Xml Based Validation In Struts2?

Answer:

Following is the list of various types of field level and non-field level validation available in Struts2 −

  • date validator
  • double validator
  • email validator
  • expression validator
  • int validator
  • regex validator
  • required validator
  • requiredstring validator
  • stringlength validator
  • url validator

 

Ques. 12):  How Does Struts 2's Interceptor Work?

Answer:

The actual action will be performed by calling invocation.invoke() from the interceptor. So, depending on your needs, you can conduct some pre-processing and some post-processing.

The framework initiates the process by using the invoke method on the ActionInvocation object (). When invoke() is called, ActionInvocation consults its state and performs the next available interceptor. The invoke() method will cause the action to be executed once all of the configured interceptors have been invoked.

 

Ques. 13): What Is Value Stack?

Answer :

The value stack is a set of several objects which keeps the following objects in the provided order −

Temporary Objects − There are various temporary objects which are created during execution of a page. For example the current iteration value for a collection being looped over in a JSP tag.

The Model Object − If you are using model objects in your struts application, the current model object is placed before the action on the value stack.

The Action Object − This will be the current action object which is being executed.

Named Objects − These objects include #application, #session, #request, #attr and #parameters and refer to the corresponding servlet scopes.

 

Ques. 14): What Is The Difference Between Valuestack And OGNL?

Answer:

ValueStack is the storage space where Struts2 stores application data for processing client requests. The information is saved in ActionContext objects that use ThreadLocal to store values that are unique to each request thread.

OGNL (Object-Graph Navigation Language) is a sophisticated Expression Language for manipulating data on the ValueStack. Both interceptors and result pages can use OGNL to access data stored on ValueStack, as shown in the architectural diagram.

 

Ques. 15): What Is The Struts-default Package And How Does It Help?

Answer:

Struts-default is an abstract package that specifies all of the Struts2 interceptors as well as the most widely used interceptor stack. To prevent having to configure interceptors twice, it's best to extend this package while configuring our application package. This is provided to assist developers by making the work of configuring interceptor and result pages in our application a lot easier.

 

Ques. 16): What Is The Purpose Of @after Annotation?

Answer :

The @After annotation marks a action method that needs to be called after the main action method and the result was executed. Return value is ignored.

public class Employee extends ActionSupport{

   @After

   public void isValid() throws ValidationException {

      // validate model object, throw exception if failed

   }

   public String execute() {

      // perform secure action

      return SUCCESS;

   }

}

 

Ques. 17): What Is The Purpose Of @before Annotation?

Answer :

The @Before annotation marks a action method that needs to be called before the main action method and the result was executed. Return value is ignored.

public class Employee extends ActionSupport{

   @Before

   public void isAuthorized() throws AuthenticationException {

      // authorize request, throw exception if failed

   }

   public String execute() {

      // perform secure action

      return SUCCESS;

   }

}

 

Ques. 18): What Is The Difference Between Using An Action Interface And Using An Actionsupport Class For Our Action Classes, And Which Would You Prefer?

Answer:

To develop our action classes, we can use the Action interface. This interface only has one function, execute(), which we must implement. The main advantage of utilising this interface is that it includes some constants that can be used on result pages, such as SUCCESS, ERROR, NONE, INPUT, and LOGIN.

The ActionSupport class implements the Action interface by default, as well as interfaces for Validation and i18n support. Action, Validateable, ValidationAware, TextProvider, and LocaleProvider are all implemented by the ActionSupport class. To implement field level validation login in our action classes, we can override the validate() method of the ActionSupport class.

Depending on the requirements, we can use any of the approaches to create struts 2 action classes, my favorite is ActionSupport class because it helps in writing validation and i18n logic easily in action classes.

 

Ques. 19): How Do We Get Servlet Api Requests, Responses, Httpsessions, and Other Objects Into Action Classes?

Answer:

Servlet API components such as Request, Response, and Session are not directly accessible through Struts2 action classes. However, in some action classes, such as checking the HTTP method or adding cookies in the response, these accesses are required.

As a result, the Struts2 API exposes a number of *Aware interfaces through which we can access these objects. Struts2 API injects Servlet API components into action classes using dependency injection. SessionAware, ApplicationAware, ServletRequestAware, and ServletResponseAware are some of the most essential Aware interfaces.

 

Ques. 20): Is Struts2 Interceptors And Action Thread Safe?

Answer:

Because an object is instantiated for each request to process, Struts2 Action classes are thread safe.

Because Struts2 interceptors are singleton classes that launch a new thread to handle the request, they are not thread safe, and we must construct them carefully to avoid any shared data concerns.