1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sp2606 [1]
3 years ago
11

Explain Cascading Style Sheets and what they do. Describe their primary function, two effects that this function has on programm

ing, and explain why this is such a benefit to the programmer.
Computers and Technology
1 answer:
Leni [432]3 years ago
4 0

Answer:

Cascading Style Sheets are special codes that is used to style or format a web page.

Explanation:

<em>Imagine, you have two web pages, and you have to style them both, using a single format. For example, in two linked web pages, you wanted both information, can be read in uniform colors, style and font size. It would be much easier if you apply only one formatting tag to them right? But that is not the case in HTML (Hypertext Mark Up Language). You have to create formatting tags that is mixed with them to be able to style or format the page or text. CSS can make this easier. All you have to do is use a single format the call on the style by means of tag. The purpose of this is to create uniformity to all web pages and to minimize the coder's efforts. It can also be used in formatting tables (like cellpaddings, border styles, border thickness, color and other things that requires formatting in HTML. Listed below is a sample CSS codes for two different web pages. </em>

<em> </em>

<em>This file is saved as try.html </em>

<em><html> </em>

<em><head>  </em>

<em><link rel="stylesheet" type="text/css" href="style.css"> </em>

<em></head> </em>

<em><body> </em>

<em><p> The quick brown fox </p> </em>

<em></body> </em>

<em></html> </em>

<em> </em>

<em>And another file is saved as trytwo.html </em>

<em><html> </em>

<em><head>  </em>

<em><link rel="stylesheet "type="text/css" href="style.css"> </em>

<em></head> </em>

<em><body> </em>

<em><p> Jumps over the lazy dog </p> </em>

<em></body> </em>

<em></html> </em>

<em> </em>

<em>style.css </em>

<em> body{ </em>

<em>background-color: lightblue;  } </em>

<em> </em>

<em>p{ </em>

<em>color: navy; } </em>

<em> </em>

<em> Both webpage will be using the same font color which is navy blue. This would prevent the coder or programmer to redo the font formatting tags.With a single file, he can re use the styles to other webpages. </em>

<em> It would benefit the programmer to save himself effort and time. And it would allow him to debug the codes in much easier way. </em>

<em />

You might be interested in
What new england industry quickly collapsed with the discovery of oil in pennsylvania
Elena-2011 [213]

It was the whaling industry.  Whaling use to be the main source of oil that was used for fuel and lighting in America which was based in the coastal communities of New England.  It went into decline when oil was discovered in 1859.  Eventually it replaced whale oil as a source of fuel and life.

6 0
3 years ago
Read 2 more answers
What occurs in a steam engine?
VARVARA [1.3K]
Fist one correct.
second wrong because not all heat is used for work, some of it lost to other.
third wrong because fuel burn inside is called combustion engine
 <span />
7 0
3 years ago
Read 2 more answers
You want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you shoul
nikklg [1K]

If you want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you should type chmod a <u>t  <subdir>.</u>

<h3>What is Subdir?</h3>

The Definition of the term subdirectory is known to be a kind of an organizational directory that can be seen on a computer.

It is known to be one that can be found inside another directory  such as a subfolder. It is seen as the file a person is looking for and it is one that needs to have an extension.

Therefore, if you want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you should type chmod a <u>t  <subdir>.</u>

Learn more about directory from

brainly.com/question/14845522

#SPJ1

See full question below

You want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. To do so, you should type:

chmod a+_____ <subdir>

- s

- p

- b

- t

6 0
1 year ago
What does the poster exemplify?
zloy xaker [14]

Answer:

try D

Explanation:

8 0
3 years ago
Read 2 more answers
For this lab you will write a class to create a user-defined type called Shapes to represent different shapes, their perimeters
maw [93]
<h2>Answer:</h2>

<u />

========= Shape.java  ===========

//import the Scanner class

import java.util.Scanner;

public class Shape{

   //required fields

  private String shape;

   private double area;

   private double perimeter;

   //default constructor

  public Shape(){

       this.shape = "unknown";

       this.area = 0.0;

       this.perimeter = 0.0;

   }

   //constructor with one parameter

   public Shape(String shape){

       this.setShape(shape);

       this.area = 0.0;

       this.perimeter = 0.0;

   }

   //accessors and mutators

  public void setShape(String shape){

       this.shape = shape;

   }

  public String getShape(){

       return this.shape;

   }

   public double getPerimeter(){

       return this.perimeter;

   }

  public double getArea(){

       return this.area;

   }

  public void setPerimeter(Scanner scr){

       if(this.getShape().equals("circle")){

           System.out.println("Enter the radius of the circle");

           double radius = scr.nextDouble();

           this.perimeter = 2 * 3.142 * radius;

       }

       else if(this.getShape().equals("rectangle")){

           System.out.println("Enter the width");

           double width = scr.nextDouble();

           System.out.println("Enter the height");

           double height = scr.nextDouble();

           this.perimeter = 2 * (width + height);

       }

       else if(this.getShape().equals("square")){

           System.out.println("Enter the height or width");

           double height = scr.nextDouble();

           this.perimeter = 4 * height;

       }

       else if(this.getShape().equals("unknown")){

           System.out.println("You must define a shape first before calculating perimeter");

           this.perimeter = 0.0;

       }

       else {

           System.out.println("You must define a shape first before calculating perimeter");

           this.perimeter = 0.0;

       }

   }

   public void setArea(Scanner scr){

       if(this.getShape().equals("circle")){

           System.out.println("Enter the radius of the circle");

           double radius = scr.nextDouble();

           this.area = 3.142 * radius * radius;

       }

       else if(this.getShape().equals("rectangle")){

           System.out.println("Enter the width");

           double width = scr.nextDouble();

           System.out.println("Enter the height");

           double height = scr.nextDouble();

           this.area = width * height;

       }

       else if(this.getShape().equals("square")){

           System.out.println("Enter the height or width");

           double height = scr.nextDouble();

           this.area = height * height;

       }

       else if(this.getShape().equals("unknown")){

           System.out.println("You must define a shape first before calculating area");

           this.area = 0.0;

       }

       else {

           System.out.println("You must define a shape first before calculating area");

           this.area = 0.0;

       }

   }

   //Own methods

   //1. Method to show the properties of a shape

   public void showProperties(){

       System.out.println();

       System.out.println("The properties of the shape are");

       System.out.println("Shape : " + this.getShape());

       System.out.println("Perimeter : " + this.getPerimeter());

       System.out.println("Area : " + this.getArea());

   

   }

   //2. Method to find and show the difference between the area and perimeter of a shape

   public void getDifference(){

       double diff = this.getArea() - this.getPerimeter();

       System.out.println();

       System.out.println("The difference is " + diff);

   }

}

========= ShapeTest.java  ===========

import java.util.Scanner;

public class ShapeTest {

   public static void main(String [] args){

       Scanner scanner = new Scanner(System.in);

       // create an unknown shape

       Shape shape_unknown = new Shape();

       //get the shape

       System.out.println("The shape is " + shape_unknown.getShape());

       //set the area

       shape_unknown.setArea(scanner);

       //get the area

       System.out.println("The area is " + shape_unknown.getArea());

       //set the perimeter

       shape_unknown.setPerimeter(scanner);

       //get the perimeter

       System.out.println("The perimeter is " + shape_unknown.getPerimeter());

       // create another shape - circle

       Shape shape_circle = new Shape("circle");

       //set the area

       shape_circle.setArea(scanner);

       //get the area

       System.out.println("The area is " + shape_circle.getArea());

       //set the perimeter

       shape_circle.setPerimeter(scanner);

       //get the area

       System.out.println("The perimeter is " + shape_circle.getArea());

       //get the properties

       shape_circle.showProperties();

       //get the difference between area and perimeter

       shape_circle.getDifference();

   }

}

<h2>Sample output:</h2>

The shape is unknown

You must define a shape first before calculating area

The area is 0.0

You must define a shape first before calculating perimeter

The perimeter is 0.0

Enter the radius of the circle

>> 12

The area is 452.448

Enter the radius of the circle

>> 12

The perimeter is 452.448

The properties of the shape are

Shape : circle

Perimeter : 75.408

Area : 452.448

The difference is 377.03999999999996

<h2>Explanation:</h2>

The code above is written in Java. It contains comments explaining important parts of the code. Please go through the code for more explanations. For better formatting, the sample output together with the code files have also been attached to this response.

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
57aa40cd91dceaa5454e65fc5d209315.png
5 0
3 years ago
Other questions:
  • C programming:
    10·1 answer
  • Which of the following are common problems experienced with software applications?
    15·1 answer
  • End-user development: the process by which an organization's non-it specialists create software applications.
    8·1 answer
  • If you find yourself boxed in by a vehicle on your left or right _____________
    14·2 answers
  • If you delete an imessage does the other person see it
    12·1 answer
  • How to check what level you are in runescape?
    9·2 answers
  • The blue bar across the top of the screen informs you of the Screen Title, or what step you are on.
    5·1 answer
  • which of the following types of software is for organizing analyzing and storing data in a table A spreadsheet software B databa
    11·1 answer
  • Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
    7·1 answer
  • Electrical data suitable for transmission is called a(n)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!