Set a grey border to an element, using the border-secondary class in Bootstrap 4.Add it like the following example − I have also included the “mystyle” class to style the div − .mystyle { width: 250px; height: 150px; margin: 10px; } Let us see an example to implement the border-secondary class −ExampleLive Demo Bootstrap Example .mystyle { width: 250px; height: 150px; margin: 10px; } Shape Rectangle with gray border
HTTP HeaderThe line Content-type:text/html\r\r is part of HTTP header which is sent to the browser to understand the content. All the HTTP header will be in the following form −HTTP Field Name − Field ContentFor ExampleContent-type − text/html\r\rThere are few other important HTTP headers, which we will use frequently in our CGI Programming. Sr.No.HeaderDescription1Content-type:A MIME string defining the format of the file being returned. Example is Content-type:text/html2Expires: DateThe date the information becomes invalid. It is used by the browser to decide when a page needs to be refreshed. A valid date string is in the format 01 Jan 1998 ... Read More
Display a green border to an element in Bootstrap that indicates success using the border-success class.Set the border as green − Green border I have also added “mystyle” class in the div, which is to style our div, a rectangle in my example −.mystyle { width: 250px; height: 150px; margin: 10px; }Implement the border-success as shown below −ExampleLive Demo Bootstrap Example .mystyle { width: 250px; height: 150px; margin: 10px; } Shape Green border
Python's cgi module is usually the starting place in writing CGI programs in Python. The main purpose of the cgi module is to extract the values passed to a CGI program from an HTML form. Mostly one interacts with CGI applications through an HTML form. One fills out some values in the form that specify details of the action to be performed, then call on the CGI to perform its action using your specifications.You may include many input fields within an HTML form which can be of a number of different types (text, checkboxes, picklists, radio buttons, etc.).Your Python script ... Read More
To set negative action (danger) for cards with red background color, you need to use the Bootstrap contextual class card-danger.Set the danger action − Danger! High Voltage! You can try to run the following code to set danger action for a card in Bootstrap 4 −ExampleLive Demo Bootstrap Example Messages How you doing? Danger! High Voltage!
Set a container of cards, using the card-deck class.Work it inside the following div that would be of equal width and height − You can try to run the following code to implement the card-deck class −ExampleLive Demo Bootstrap Example Demo Messages Note: Resize the browser to check the effect. Nothing new! Warning! Compile-time error! Check again! We won!
Passing Text Area Data to CGI ProgramTEXTAREA element is used when multiline text has to be passed to the CGI Program.Here is example HTML code for a form with a TEXTAREA box − Type your text here... The result of this code is the following form −Type your text here... SubmitBelow is textarea.cgi script to handle input given by web browser −#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from fields if form.getvalue('textcontent'): text_content = form.getvalue('textcontent') else: text_content = "Not entered" print ... Read More
Passing Checkbox Data to CGI ProgramCheckboxes are used when more than one option is required to be selected.Here is example HTML code for a form with two checkboxes − Maths Physics The result of this code is the following form −Maths Physics Select SubjectBelow is checkbox.cgi script to handle input given by web browser for checkbox button.#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from fields if form.getvalue('maths'): math_flag = "ON" else: math_flag = "OFF" if form.getvalue('physics'): physics_flag = "ON" else: ... Read More
Use .align-content-*-center class to align gathered items in the center on different screens in Bootstrap 4.Here is how you can align gathered items in the center on different screens −Small Screen SizeMedium Screen SizeLarge Screen SizeYou can try to run the following code to align gathered items in the center on different screens in Bootstrap 4 −ExampleLive Demo Bootstrap Example Example One Two Three Four Five Six ... Read More
Passing Radio Button Data to CGI ProgramRadio Buttons are used when only one option is required to be selected.Here is example HTML code for a form with two radio buttons − Maths Physics The result of this code is the following form − Maths Physics Select SubjectBelow is radiobutton.py script to handle input given by web browser for radio button −#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from fields if form.getvalue('subject'): subject = form.getvalue('subject') else: subject = "Not set" print "Content-type:text/html\r\r" print ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP