Answer:
Find the detailed code in attached file.
Explanation:
See the attached file.
Answer:
body {
width: 95%;
min-width: 640px;
max-width: 960px
;
margin-left: auto;
margin-right: auto;
height: 100%
}
Explanation:
represents the HTML tag that you want to style using CSS
There are two major ways to style a text it can either be fixed or fluid.
Fixed layout: The height and width are not flexible, it is specified by using pixels.
Fluid: The height and the width are flexible it makes use of percentages and ems.
<em />
<em> min-width: 640px;
</em>
<em> max-width: 960px
;</em>
sets the width to 95% of the browser window and sets the pixel range from 640 pixels up to 960 pixels.
- <em>margin-left: auto;
</em>
<em> margin-right: auto;
</em>
these lines of code horizontally center the page body within the browser window by automatically setting the margin alignment.
it Set the minimum height of the browser window to 100% , ensuring that the height of the page body is always at least as high as the browser window itself.
Answer:
Following are the program in java language that is mention below
Explanation:
import java.util.*; // import package
public class Half_XmasTree // main class
{
public static void main(String args[]) // main method
{
int k,i1,j1; // variable declaration
Scanner sc2=new Scanner(System.in); // create the object of scanner
System.out.println("Enter the Number of rows : ");
k=sc2.nextInt(); // Read input by user
for(i1=0;i1<k;i1++) //iterating the loop
{
for(j1=0;j1<i1;j1++) // iterating the loop
System.out.print(" ");
for(int r=k-i1;r>0;r--) //iterating loop
System.out.print("*"); // print *
System.out.println();
}
}
}
Output:
Following are the attachment of output
Following are the description of program
- Declared a variable k,i1,j1 as integer type .
- Create a instance of scanner class "sc2" for taking the input of the rows.
- Read the input of row in the variable "K" by using nextInt() method .
- We used three for loop for implement this program .
- In the last loop we print the * by using system.println() method.