- Write a program describing how you spent your vacation in html by using the attributes
top margin and left margin.
write the program clearly
Answers
Answer:
<HTML>
<HEAD>
<TITLE>How I Spent My Vacation</TITLE>
</HEAD>
<BODY>
<P ALIGN = "CENTER"><B>My Vacation</B></P>
<P>I spend my vacation in many historical places like Gol Ghar, Sis Mahal, Kutub Minar, India Gate, Gateway of India and Mysore Palace in India. I spent my vacation in treeking the mountains and forests. I spent my vacation in Astronomical Science Club to learn more about the stars and planets and galaxies in the universe. This is all about myself that how I spent my vacations.</P>
<STYLE>
p
{
margin-top : 30px;
margin-left : 20px;
}
</BODY>
</HTML>
Explanation:
As we know that HTML is a hypertext markup language which is used in designing the website of my own by myself. It is a markup language not a programming language. Here, we are using margin which is a property of CSS. As we know that CSS stands for Cascading Style Sheet. It is a language which apply the styles on the website to make the website attractive. Here, we are using margin. First of all, margin are of four types are as follows as:
- margin-top
- margin-right
- margin-bottom
- margin-left
These are the four types of margin in Cascading Style Sheet Language.
We write the CSS code in two types are as follows as:
Method First - 1
p
{
margin : 30px 0px 0px 20px;
}
Method Second -2
p
{
margin-top : 30px;
margin-left : 20px;
}
By these two method, we apply the style of CSS in our website of vacation.
- As we know that, the first is margin-top, the second is margin-right, the third is margin-bottom and the fourth is margin-left. In first method, we are using this concept please look at the first method.
- If you want to look the output of my code in Brainly then write [/tex] the top of my HTML code and end of the HTML code.
Learn more from this link:
https://brainly.in/question/4021013