tag:blogger.com,1999:blog-57726139783710785982022-01-28T06:48:15.506-08:00MAD ABOUT COMPUTERMAHESH MISHRAhttp://www.blogger.com/profile/04872997688514118922noreply@blogger.comBlogger150125tag:blogger.com,1999:blog-5772613978371078598.post-81171959123492394572022-01-20T04:51:00.003-08:002022-01-20T04:51:37.035-08:00Impact of Computers on the World: - Positive and Negative<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg1o75BuYOhSV2HAhA-OKx30rOsmkM-5JZghbUAQIkrWKsVmZrgDlvJMksFNAviwuVG_UbCBjvb12NgWdsagCB_YCa4_0oEXW97KIxBbO4OSSOYe-nAz_40qEYlRNGigoIyRsHO42O7V6roOgEBYo4YH9q2X1MbmJ2v8QLDvPjTfCmXbbErDpTzxWU-=s869" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="508" data-original-width="869" src="https://blogger.googleusercontent.com/img/a/AVvXsEg1o75BuYOhSV2HAhA-OKx30rOsmkM-5JZghbUAQIkrWKsVmZrgDlvJMksFNAviwuVG_UbCBjvb12NgWdsagCB_YCa4_0oEXW97KIxBbO4OSSOYe-nAz_40qEYlRNGigoIyRsHO42O7V6roOgEBYo4YH9q2X1MbmJ2v8QLDvPjTfCmXbbErDpTzxWU-=s16000" /></a></div><br /> As we know the computer is one of the most powerful weapons nowadays in our society. Today most of the work has done by computers. Computer saved people time and increase the doing efficiency of work. The daily use of computers has put a strong impact on people's life. The effects are positive as well as negative. We all know that every coin has two faces 1. Head and 2 tails. So, Everything has two sides <b>Positive </b>and <b>Negative</b>. <p></p><p>So, today’s article is based on the positive and negative impact of computers nowadays on people day to day life. We are going to discuss both sides in this article.</p><h1 style="text-align: left;"><span style="color: #cc0000; font-family: georgia;"><i style="background-color: #ffe599;">POSITIVE IMPACT OF COMPUTER</i></span></h1><p>There is a lot of positive impact of computer. We are going to discuss it through points. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEigItwULIRKhgA8xzffgphGiX6EG-leV7BI9AWYjtqkIbVrW-Doq0JIf7sqU82u811Gc_nnhoB9G0g3yYESwefjcJA80yawi9XbCn9Ae_kHpXQiBCdZbozW67UvhwbaSz0g1HU-kb95r2RlcFp_xOHXgya09ANh3B1xydKiqVSIjhrautZmavvta6ZH=s507" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="507" src="https://blogger.googleusercontent.com/img/a/AVvXsEigItwULIRKhgA8xzffgphGiX6EG-leV7BI9AWYjtqkIbVrW-Doq0JIf7sqU82u811Gc_nnhoB9G0g3yYESwefjcJA80yawi9XbCn9Ae_kHpXQiBCdZbozW67UvhwbaSz0g1HU-kb95r2RlcFp_xOHXgya09ANh3B1xydKiqVSIjhrautZmavvta6ZH=s16000" /></a></div><p></p><ul style="text-align: left;"><li><span style="color: #cc0000;"><b>Employment Benefits: -</b> </span>The Computer helps millions of people, It is the most important point of all the points.</li></ul><ul style="text-align: left;"><li><b><span style="color: #cc0000;">Educational Benefits: -</span></b> As you know due to coronavirus all the educational firms are closed. So all the classes are taken from the home. <b>Teachers use laptops or computers</b> to take lectures of the students. </li><li><b><span style="color: #cc0000;">Entertainment Benefits:-</span></b> People use computers for their entertainment through games, watching movies. </li><li><b><span style="color: #cc0000;">Improved Efficiency:-</span></b> Computers have increased the <b>ability of people to work</b>. Because of the work that used to be done in the first 2 hours. Today the same work is done in 10 to 15 minutes with the help of computers.</li><li><b><span style="color: #cc0000;">Improved Service:-</span> </b>People have received good services from any government or private agency because of the computer. </li><li><b><span style="color: #cc0000;">Better information retrieval:-</span></b> With the help of computers, it is possible to search millions of documents within a few seconds. There is no need to search for information from a bundle of papers.</li></ul><h1 style="text-align: left;"><span style="color: #cc0000; font-family: georgia;"><i style="background-color: #ffe599;">NEGATIVE IMPACT OF COMPUTER</i></span></h1><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi4ieX2-98iFztySdyTqi-_mUm9jqOsLM7uKVFg7tdwzwyzzsBpC_vxQeZeeUr-i5Vk1zv6FB46zA2wM7B-DL2lYqXjlGw9UeDoxuEoz1m-NG3fTi6Zn-IbLBd4hQXzUtl5NecmAsOQdzMYQXJjzXGLchdLXwgeh6N2eDHorJDCX9W1dcghp0umZi_w=s509" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="263" data-original-width="509" src="https://blogger.googleusercontent.com/img/a/AVvXsEi4ieX2-98iFztySdyTqi-_mUm9jqOsLM7uKVFg7tdwzwyzzsBpC_vxQeZeeUr-i5Vk1zv6FB46zA2wM7B-DL2lYqXjlGw9UeDoxuEoz1m-NG3fTi6Zn-IbLBd4hQXzUtl5NecmAsOQdzMYQXJjzXGLchdLXwgeh6N2eDHorJDCX9W1dcghp0umZi_w=s16000" /></a></div></div><p></p><ul style="text-align: left;"><li><b><span style="color: #800180;">Employment Problems:-</span></b> The main negative impact of computers on human life was the employment problem. <b>Computer reduced the manpower of the work</b>. And If a work can be done by one man with the help of computers. So why would the employer hire more men for the same job? That’s why sometimes computers have a negative impact on human life.</li><li><b><span style="color: #800180;">Collection of unnecessary data:-</span></b> This is also a main negative impact of computers. Today many government and private <b>companies collect unnecessary information</b> about any person. There is no need to collect all this information on the computer. This information takes a lot of memory space of the computer. </li><li><b><span style="color: #800180;">Issue of System Security:-</span></b> It is also an important point of negative impact. Anybody (who is working on the company, or hackers who access your personal data.) can change, stole, or know your personal information which you don’t want to share with everybody. There are a lot of computer viruses through which hackers or computer experts enter into the computer system to do anything they want with your data.</li><li><b><span style="color: #800180;">People are depending too much on it:-</span></b> Ever since the advent of computers,<b> humans have become dependent on computers</b>. People become lazier to do work. </li></ul><p></p><h1 style="text-align: left;"><b><span style="background-color: #ffe599; color: #cc0000;">The Conclusion</span></b></h1><p><b><span style="color: #800180;">This author concludes that invention is good as long as it is used for the good of men. Those inventions can prove to be harmful and fatal for humans. Those are not inventions but a curse. However, people should also understand what they are inventing. Is that invention a curse or a boon for human life?</span></b></p><br />Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com0tag:blogger.com,1999:blog-5772613978371078598.post-61299608223919601242022-01-07T07:12:00.001-08:002022-01-07T07:12:03.982-08:00Introduction to Number System.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjRrB77SmfG3zM2jParctsZi8hDCKlDg19X1_2n-1xf2UPTQ52dcg6e5XabqCtT2ewFN9rfSVno7rNUnzR_73QJASvlU6b5PdTuv3reYEf82pCpsW6DxB4nJpzycZmrmtOcwg_XKSfJveExrZJ_F4t9_xCx_f-Bq3lqbz9M54DeMPK9mlsYakMck-vZ=s600" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="350" data-original-width="600" src="https://blogger.googleusercontent.com/img/a/AVvXsEjRrB77SmfG3zM2jParctsZi8hDCKlDg19X1_2n-1xf2UPTQ52dcg6e5XabqCtT2ewFN9rfSVno7rNUnzR_73QJASvlU6b5PdTuv3reYEf82pCpsW6DxB4nJpzycZmrmtOcwg_XKSfJveExrZJ_F4t9_xCx_f-Bq3lqbz9M54DeMPK9mlsYakMck-vZ=s16000" /></a></div><div style="text-align: left;"><br /></div><div style="text-align: left;">As we all know that a computer is used to process data entered by the users, and provide results as output. A set of instructions has to be fed into the computer system to instruct the computer that how to process data. And which type of calculation is done when users entered some information through input devices. </div><div style="text-align: left;"><br /></div><div style="text-align: left;">All this information is instructed in the form number system that the computer can understand. These Data can be in the form of characters as well as numbers. </div><div style="text-align: left;"><br /></div><p><b>There are commonly 4 types of a number system. These are:- </b></p><p></p><ul style="text-align: left;"><li><b><span style="color: #3d85c6;">Binary Number System</span></b></li><li><b><span style="color: #3d85c6;">Decimal Number System</span></b></li><li><b><span style="color: #3d85c6;">Hexadecimal Number System</span></b></li><li><b><span style="color: #3d85c6;">Octal Number System</span></b></li></ul><p></p><p>Now, we are going to discuss this briefly. </p><p><b><span style="color: #990000;">Note:- The number of digits that can occur at each position of a number in any number system is known as the base of that number system. </span></b></p><h1 style="text-align: left;">1. <u>Decimal Number System</u></h1><p>This is the most commonly used number system in our daily life. The total number of digit in that number system are :- <b>0,1,2,3,4,5,6,7,8,9</b>.</p><p>The base of that number is 10. The decimal number system is a positional number system that means each digit has a fixed position or weight associated with it, that is why it is also known as the weighted number system. </p><p>I know it is a little bit confusing. So let’s go with an amazing example to understand about it. </p><h3 style="text-align: left;"><b>For Example:- </b></h3><p>Let some number randomly, we assume a number 786, now in that number <b>the weight of number [6] is 1 (ones), number [8] is 10 (tens) and number [7] is 100 (hundred). </b>The Number of tens increases every time whenever the number increase.<b> Ex:- 4555 </b>in this example, 4 is the most significant number as the base value of 4 was thousand means 10^4. </p><p>We can define them as <b>10^0 for 6, 10^1 for 8, 10^2 for 7</b>. That’s why we read it as <b>Seven Hundred Eighty-Six. </b></p><p>As in the decimal number system, the base is 10, we represent the given number as 786^10. </p><p>Now, We are going to see an example of a decimal number. </p><p>Let Consider a number anything you want. Suppose we assume a decimal number <b>321.123. </b></p><p><b><span style="color: #cc0000;">Note:- If the base is not given in the number it should automatically take 10. </span></b></p><p></p><div class="separator" style="clear: both; text-align: left;">Now, In the decimal number system, the places to the left of the decimal point are positive and the right point is the negative power of 10. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The Number before the decimal point is known as an <b>Integral part,</b> And the number after the decimal point is known as the <b>fractional</b> <b>part</b>.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">In the given below image, you can see both the integral part and fractional part with their powers. </div><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-j9hKZ1BSBQM/Ydg6dpskp3I/AAAAAAAAZNE/JoEOOa98aCM3p1SbNnvqeja2NGT2tvTxQCNcBGAsYHQ/image.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="550" data-original-width="975" src="https://lh3.googleusercontent.com/-j9hKZ1BSBQM/Ydg6dpskp3I/AAAAAAAAZNE/JoEOOa98aCM3p1SbNnvqeja2NGT2tvTxQCNcBGAsYHQ/s16000/image.png" /></a></div><br />So Friends, this is part 1 of this post in our next part we discuss the rest of the number system briefly. Hope what we describe in this post is understandable for you guys. And if you have any doubt then comment below I will try to solve it with my possibilities. Thank You.. 😊<div><br /><div>Image is sourced from Google Images. <p></p><div><br /></div></div></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com0tag:blogger.com,1999:blog-5772613978371078598.post-6524472093021070962022-01-01T06:21:00.008-08:002022-01-07T05:08:40.424-08:00Basic Anatomy of Computer<h1 style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgHlA7KbpxoctsnHrTXHlXv8k4PyKFGXsA-ZfK-qanLRgqSbSTV0SsFks9D9QBMnB1UmW_y4nuSprfuzfsDucRgsOgY3EphGV9bCFsGG6-gj2NTVoobBdN9PXfxeNdAD7Svvx2dzViD3DI0D1o_Bpn6-8Ohnr2ZdQop-oDkZxz6FaKmddpM0wrv_llz=s773" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="515" data-original-width="773" src="https://blogger.googleusercontent.com/img/a/AVvXsEgHlA7KbpxoctsnHrTXHlXv8k4PyKFGXsA-ZfK-qanLRgqSbSTV0SsFks9D9QBMnB1UmW_y4nuSprfuzfsDucRgsOgY3EphGV9bCFsGG6-gj2NTVoobBdN9PXfxeNdAD7Svvx2dzViD3DI0D1o_Bpn6-8Ohnr2ZdQop-oDkZxz6FaKmddpM0wrv_llz=s16000" /></a></div></h1><h1 style="text-align: left;"><b>Introduction</b> </h1><p>In many areas of the world, many things are done through computers. Today, the work of a few hours is done within a few seconds through the computer. A Computer saves a lot of human time. We have mentioned about the history of computer in our last few chapters, if you have not read that then go read it. We have told about a computer history in this chapter. In today's chapter, we will learn about common computer equipment. </p><h1 style="text-align: left;"><b>Basic Anatomy of Computers</b></h1><p>Before the basic anatomy of computers. We would like to define what is Computer? I have already told it in our previous article with full definition if you don’t know computer we recommend you to read it. So</p><p>A Computer is an electronic machine that accepts data from the users through input devices and processess it and gives some output through the output device. This is a simple definition of computer. Now All the computer systems perform<b> 5 Basic Operations </b>these are:- </p><p></p><ul style="text-align: left;"><li><b>Inputting :-</b> The process of entering data and instruction into the computer system. </li><li><b>Storing :-</b> Saving the data or instruction somewhere so that when require they are available. </li><li><b>Processing :-</b> Performing arithmetical operation or logical operations on data so they output some useful information. </li><li><b>Outputting :- </b>The Process of producing the useful information to the users through some output devices.</li><li><b>Controlling :-</b> Directing the manner and Sequence in which all of the above operations are performed. </li></ul><p></p><p>All of the above mention options are performed by some functional units which form the basic building blocks of any computer system.</p><p>In this Figure, the solid lines are used to indicate the flow of instructions or data the lines represent the control exercised by the control unit. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg2kpYbCiCMjVeg0HYTSzgEls50pzjuS4lCOCBFc1WI-UalrcnBZsmUHa41BIrFXW-mSJWJ752_tjB7SJEIwLD-Sp5BVTlm9vNaksooLgHNF-DWatzuvRhEZzAFI0rr5nkvC8eSMDXBEqO0Fjc2YjMaCq5SoIh97DryQaNd7xZZXE_mJxdG-kA4MKyb=s832" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="832" src="https://blogger.googleusercontent.com/img/a/AVvXsEg2kpYbCiCMjVeg0HYTSzgEls50pzjuS4lCOCBFc1WI-UalrcnBZsmUHa41BIrFXW-mSJWJ752_tjB7SJEIwLD-Sp5BVTlm9vNaksooLgHNF-DWatzuvRhEZzAFI0rr5nkvC8eSMDXBEqO0Fjc2YjMaCq5SoIh97DryQaNd7xZZXE_mJxdG-kA4MKyb=s16000" /></a></div><br /><p>In this chapter we have only see the anatomy of computer. In our next article, we are going to know more about this. Stay Happy.</p><p>Images Source :- Google Images.</p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com0tag:blogger.com,1999:blog-5772613978371078598.post-1255879690086505132021-08-28T05:02:00.002-07:002021-08-28T05:02:54.072-07:00What is Computer? History of Computer.<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-ssAhHsLfzAU/YSnji6hHBKI/AAAAAAAAXr0/arDu1M5rfLw77HfnlxCTew8fTb87D4-5ACLcBGAsYHQ/s598/computer%2Bimage.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="509" data-original-width="598" height="272" src="https://1.bp.blogspot.com/-ssAhHsLfzAU/YSnji6hHBKI/AAAAAAAAXr0/arDu1M5rfLw77HfnlxCTew8fTb87D4-5ACLcBGAsYHQ/s320/computer%2Bimage.JPG" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Image Source:- Quora</td></tr></tbody></table><p><br /></p><p>Hey Friends in today's era, computers or laptops are the basic components which are used normally in all the workplaces such as schools, colleges, hospitals, laboratories, companies, etc. Today Computer is the basic thing in our day to day life. Human life has become very easier with computers. Because you can do your work within second with the help of computer and internet. Such as sending an important file to someone. Just open your laptop and mail the document within seconds. So today we are going to discuss computers and their different types. And also the basic computer required for computers. So Let’s Begin…</p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">What is Computer? </span></h1><p>Many people use a computer daily for some work. But do you know about computers? what is a computer? I bet many people didn’t know about it. So Basically, A Computer is <b>a programmable electronic device</b>, which is used to perform<b> mathematically</b> or <b>logically</b> operations. A user input data through any <b>input device</b> after that a <b>set of instruction</b> process and provide the result of it as “<b>Output</b>”.</p><p>A Computer can process arithmetical as well as logical calculations. <b>Arithmetically operation</b> such as <b>+,-,/,*</b> etc and <b>logical operations</b> are <b> a>b, a<b, a>=b,</b> etc. These operations are processed by a set of instruction written on it. </p><p>In simple words, <b>A computer is an electronic device that accepts data as input and processes it, and gives the result of that input as output. </b></p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Father of Computer and The first computer</span></h1><p>Do You know that the father of computers is <b>Charles Babbage</b>. Because it is believed that the first computer was invented by him. <b>Analytical Engine</b> is considered as the first computer which is invented by Charles Babbage was first described in <b>1837</b>. </p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">From an Electronic Device to Computer.</span></h1><div><span style="white-space: pre;"><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-rhtKB1sx26M/YSolbCHCKeI/AAAAAAAAXsY/R2ChJpa7oLEvPJNgm9nebN0MSj1osXePgCLcBGAsYHQ/image.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="352" data-original-width="745" src="https://lh3.googleusercontent.com/-rhtKB1sx26M/YSolbCHCKeI/AAAAAAAAXsY/R2ChJpa7oLEvPJNgm9nebN0MSj1osXePgCLcBGAsYHQ/s16000/image.png" /></a></div><br /></span></div><p>Now let all these aside and tell me that do you know how an electronic device gets the name computer?</p><p>The term Computer is derived from<b> the Latin word “Computare</b>” which means <b>calculate.</b></p><p><br /></p><p>So that is for today guys we will be back soon with another tutorial. Keep learning with mad about computer. You can also check more information about computers. <a href="/2016/02/introduction-to-computer.html" target="_blank"><b>Click Here For More</b></a></p><p><br /></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com3tag:blogger.com,1999:blog-5772613978371078598.post-18572272497005221432021-08-12T23:25:00.000-07:002021-08-12T23:25:30.252-07:00What is Address Bus, Data Bus & Control Bus in Computer?<div dir="ltr" style="text-align: left;" trbidi="on"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-lzu3bQlaqns/W5ksWIOXYJI/AAAAAAAANl0/DdSMabTnldQRaxkgCGDiVmNBbsJJY9ZsgCEwYBhgL/s1600/The%2Bconcept%2Bof%2BBuses%2Bin%2BComputer.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="266" src="https://4.bp.blogspot.com/-lzu3bQlaqns/W5ksWIOXYJI/AAAAAAAANl0/DdSMabTnldQRaxkgCGDiVmNBbsJJY9ZsgCEwYBhgL/s400/The%2Bconcept%2Bof%2BBuses%2Bin%2BComputer.jpg" width="400" /></a></div><br />If you’re reading this tutorial by skipping the previous tutorial then I strongly recommended to you to learn first previous tutorial. In the <b><a href="/2018/08/concept-of-buses-in-computer-address-bus-control-bus-data-bus.html" target="_blank">Previous tutorial</a></b>, we had discussed <b><a href="/2018/08/concept-of-buses-in-computer-address-bus-control-bus-data-bus.html" target="_blank">the basic concept of Buses.</a></b> We can also say that previous tutorial is introduction tutorial about buses…<br /><br />Let’s come on topic…Today I am going too described Address Bus, Data Bus, and Control Bus.<br /><br /><h3 style="text-align: left;"><b><span style="font-size: x-large;">What is the Address Bus?</span></b></h3>The address bus is used by the CPU to send the address of the memory location or the input/output port that is to be accessed at the instant. It is a unidirectional bus i.e. the address can be transferred in one direction only and that is form CPU to the required port or location.<br /><br />Whether it is a read operation or write operation the CPU calculates the address of the required data and sends it on the data bus for the execution of the required operation. The maximum number of memory locations that can be accessed in a system is determined by the number of lines of an address bus.<br /><br />An address bus of n lines can be addressed at the most 2n locations directly. Thus a 16-bit address bus can allow access 2 16 bit or 64 K Byte of memory.<br /><br /><b><a href="/2018/01/application-software-types-of-application-software.html" target="_blank">People Also Read:- What is an Application Software? And It's Need.</a></b><br /><b><a href="/2018/01/what-is-software-engineering-need-for-software-engineering.html" target="_blank">People Also Read:- What is Software Engineering? About Carrier.</a></b><br /><div><br /></div><h2 style="text-align: left;"><b><span style="font-size: x-large;">What is Data Bus?</span></b></h2>A data bus is used to carry the data and instructions from the CPU to memory and peripheral devices and vice versa. Thus it is a bidirectional bus. It is one of most important parts of the connections to the CPU because every program instruction and every byte of data must travel across the bus at some point.<br /><br />The size of the data bus is measured in bits. The data bus size has much influence on the computer architecture because the important parameters of it like word size, the quantum of data etc. are determined and manipulated by the size of the data bus.<br /><br />Generally, a microprocessor is called n-bit processors. Thus as the CPU became more advanced, the data bus grew in size. A 64-bit data bus can transfer 8 bytes in every bus cycle and thus its speed is much faster as compared to the 8-bit processor that can transfer one byte in every bus cycle.<br /><br /><h3 style="text-align: left;"><b><span style="font-size: x-large;">What is a Control Bus?</span></b></h3>A control bus contains various individual lines carrying synchronizing signals that are used to control. Various peripheral devices connected to the CPU. The common signals that are transferred to the control bus from CPU to devices and vice versa are memory read, memory writes, I/O read, I/O write etc.<br /><br />Signals are designed, keeping in mind, the design philosophy of the microprocessor and the requirement of the various devices connected to the CPU. So different types of the microprocessor have different control signals. See Below for better understanding.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-BNPnhAFcMto/W5krrSBMrfI/AAAAAAAANls/6jKFR658iWUMC3DgAhBxbYEr2HnZX7YGgCEwYBhgL/s1600/Control%2BBus%2Baddress%2Bbus%2Band%2Bdata%2Bbus.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="764" data-original-width="1600" src="https://1.bp.blogspot.com/-BNPnhAFcMto/W5krrSBMrfI/AAAAAAAANls/6jKFR658iWUMC3DgAhBxbYEr2HnZX7YGgCEwYBhgL/s1600/Control%2BBus%2Baddress%2Bbus%2Band%2Bdata%2Bbus.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Image Source Book</td></tr></tbody></table><br />Hopefully, you guys did still find this information is useful for you. If you have any doubt or question about this tutorial then let me know through your comment. And don’t forget to share with other computer lovers.<br />Have a Good Day!!!<br /><b><a href="/2018/01/principles-of-software-engineering-.html" target="_blank">People Also Read:- Principal of Software Engineering.</a></b><br /><b><a href="/2018/01/what-is-system-software.html" target="_blank">People Also Read:- What is System Software? Best Explanation.</a></b><br /><br /></div>MAHESH MISHRAhttp://www.blogger.com/profile/04872997688514118922noreply@blogger.com84tag:blogger.com,1999:blog-5772613978371078598.post-64237557436289062362021-08-11T05:32:00.001-07:002021-08-11T05:32:35.316-07:00CSS Tutorials : - CSS Position Property <p><span style="color: red; font-size: x-large;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="color: red; font-size: x-large;"><a href="https://1.bp.blogspot.com/-MD6A5vMDtfM/YRPDBAPQW3I/AAAAAAAAXbk/clsG75N47586wrega0_UdTogKXhpoDHKACLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-MD6A5vMDtfM/YRPDBAPQW3I/AAAAAAAAXbk/clsG75N47586wrega0_UdTogKXhpoDHKACLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.jpg" /></a></span></div><p></p><p><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS Position</b></span></p><p>The CSS Position Property is used to position any Html element before or after any Html element you want. You can place Html element anywhere you want. You can set the position of Html element by using top, bottom, left, right properties. This property is used when you set the position property of the element first. </p><p><b>Basically, The CSS Position property has 4 basic Parts:- </b></p><p></p><ul style="text-align: left;"><li><b><span style="color: #cc0000;">CSS Static Positioning</span></b></li><li><b><span style="color: #cc0000;">CSS Fixed Positioning</span></b></li><li><b><span style="color: #cc0000;">CSS Absolute Positioning</span></b></li><li><b><span style="color: #cc0000;">CSS Relative Positioning</span></b></li></ul><b><br /></b><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS STATIC POSITIONING</b></span><p></p><p>This is by default the position of the Html element. They appear normally on your web pages. They didn’t affect any positioning on your webpage. </p><p><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS Fixed Positioning</b></span></p><p>This property is used to fix the position of the Html element on your web pages. When you apply this property to the Html element they fixed their position. It doesn’t move even you scroll your window screen. <b>Let see an example to clear this property. </b></p><p><b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><!DOCTYPE</span> <span style="color: red;">html</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><html</span> <span style="color: red;">lang</span>=<span style="color: blue;">"en"</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">charset</span>=<span style="color: blue;">"UTF-8"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">http-equiv</span>=<span style="color: blue;">"X-UA-Compatible"</span> <span style="color: red;">content</span>=<span style="color: blue;">"IE=edge"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">name</span>=<span style="color: blue;">"viewport"</span> <span style="color: red;">content</span>=<span style="color: blue;">"width=device-width, initial-scale=1.0"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><title></span>Position in CSS <span style="color: maroon;"></title></span></div><br /><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">div</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">2px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">black</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">320px</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">420px</span>;</div><div> <span style="color: red;">margin</span>: <span style="color: #0451a5;">auto</span>;</div><div> <span style="color: red;">overflow</span>: <span style="color: #0451a5;">scroll</span>;</div><div> }</div><div> <span style="color: maroon;">h1</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">position</span>: <span style="color: #0451a5;">fixed</span>;</div><div> <span style="color: red;">left</span>: <span style="color: #098658;">320px</span>;</div><div> }</div><div><span style="color: maroon;"></style></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><div></span></div><div> <span style="color: maroon;"><h1></span> Tokyo Olympics 2020<span style="color: maroon;"></h1></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor s elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, doicing elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor sit asicing elit. Cobo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dog elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor sit amet g elit. Corpori eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor sit ameorporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor sit amet Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"></div></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div><p><b>Output :- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-elL4pog4g5o/YRO7qUS9ERI/AAAAAAAAXbM/hdTpdPoLpvIzmoLWgdvmlMP2TxqpDCvMwCLcBGAsYHQ/s660/fixed.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="355" data-original-width="660" src="https://1.bp.blogspot.com/-elL4pog4g5o/YRO7qUS9ERI/AAAAAAAAXbM/hdTpdPoLpvIzmoLWgdvmlMP2TxqpDCvMwCLcBGAsYHQ/s16000/fixed.JPG" /></a></div><br /><p><span style="background-color: #fff2cc; color: red;"><span style="font-size: x-large;"><b>CSS Relative Property</b></span> </span></p><p>The relative positioning property is used to set the element relative to its normal position. </p><p><b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><!DOCTYPE</span> <span style="color: red;">html</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><html</span> <span style="color: red;">lang</span>=<span style="color: blue;">"en"</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">charset</span>=<span style="color: blue;">"UTF-8"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">http-equiv</span>=<span style="color: blue;">"X-UA-Compatible"</span> <span style="color: red;">content</span>=<span style="color: blue;">"IE=edge"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">name</span>=<span style="color: blue;">"viewport"</span> <span style="color: red;">content</span>=<span style="color: blue;">"width=device-width, initial-scale=1.0"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><title></span>Position in CSS <span style="color: maroon;"></title></span></div><br /><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><style></span></div><div> </div><div> <span style="color: maroon;">h1</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">position</span>: <span style="color: #0451a5;">relative</span>;</div><div> </div><div> }</div><div><span style="color: maroon;"></style></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><div></span></div><div> <span style="color: maroon;"><h1></span> Tokyo Olympics 2020<span style="color: maroon;"></h1></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsupisicing elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum,adipisicing elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, adipisicing elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor elit. Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor sit . Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p></span>Lorem ipsum, dolor Corporis explicabo eveniet repellat?<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"></div></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div> <p><b> Output:- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-mC95FiGYShE/YRO9J5LKJwI/AAAAAAAAXbU/daZvsvFb8NMgTlkrIo70dcLBGQ2X3ePqACLcBGAsYHQ/s654/relative.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="317" data-original-width="654" src="https://1.bp.blogspot.com/-mC95FiGYShE/YRO9J5LKJwI/AAAAAAAAXbU/daZvsvFb8NMgTlkrIo70dcLBGQ2X3ePqACLcBGAsYHQ/s16000/relative.JPG" /></a></div><p><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS Absolute Positioning</b></span></p><p>In this property, the position is relative to its first position. In other words, It is positioned relative to its closest positioned ancestor. Let’s see through an example below:- </p><p><b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><!DOCTYPE</span> <span style="color: red;">html</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><html</span> <span style="color: red;">lang</span>=<span style="color: blue;">"en"</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">charset</span>=<span style="color: blue;">"UTF-8"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">http-equiv</span>=<span style="color: blue;">"X-UA-Compatible"</span> <span style="color: red;">content</span>=<span style="color: blue;">"IE=edge"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><meta</span> <span style="color: red;">name</span>=<span style="color: blue;">"viewport"</span> <span style="color: red;">content</span>=<span style="color: blue;">"width=device-width, initial-scale=1.0"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><title></span>Position in CSS <span style="color: maroon;"></title></span></div><br /><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">body</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">lightblue</span>;</div><div> }</div><div> <span style="color: maroon;">h2</span>{</div><div> <span style="color: red;">position</span>: <span style="color: #0451a5;">absolute</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">lightcoral</span>;</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">blue</span>;</div><div> <span style="color: red;">top</span>: <span style="color: #098658;">200px</span>;</div><div> <span style="color: red;">left</span>: <span style="color: #098658;">100px</span>;</div><div> }</div><div> <span style="color: maroon;">h3</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">yellow</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">cornflowerblue</span>;</div><div> }</div><div> <span style="color: maroon;">h1</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">cornsilk</span>;</div><div> <span style="color: red;">position</span>: <span style="color: #0451a5;">absolute</span>;</div><div> <span style="color: red;">top</span>: <span style="color: #098658;">250px</span>;</div><div> <span style="color: red;">left</span>: <span style="color: #098658;">300px</span>;</div><div> </div><div> }</div><div><span style="color: maroon;"></style></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p></span> It started from top left cornor. <span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><h3></span> This is a heading without positioning.<span style="color: maroon;"></h3></span></div><div> <span style="color: maroon;"><h1></span> This is a Heading 1. <span style="color: maroon;"></h1></span></div><div> <span style="color: maroon;"><h2></span> This is a Heading 2. <span style="color: maroon;"></h2></span></div><div><span style="color: maroon;"></body></span></div></div><p><span style="color: maroon; font-family: Consolas, "Courier New", monospace; font-size: 14px; white-space: pre;"></html></span> </p></div><p><b>Output :-</b> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-hlr9KdQ4UZk/YRPANThOXvI/AAAAAAAAXbc/NZUL2yWSwDkVXoE9EYyha-sJ78LqMaACACLcBGAsYHQ/s791/absolute.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="433" data-original-width="791" src="https://1.bp.blogspot.com/-hlr9KdQ4UZk/YRPANThOXvI/AAAAAAAAXbc/NZUL2yWSwDkVXoE9EYyha-sJ78LqMaACACLcBGAsYHQ/s16000/absolute.JPG" /></a></div><br /><p></p><ul style="text-align: left;"><li><a href="/2021/07/css-tutorials-css-opacity-property.html" target="_blank"><b>People Also Read :- CSS Opacity Property </b></a></li><li><a href="/2021/06/css-tutorials-css-margin-property.html" target="_blank"><b>People Also Read :- CSS Margin Property</b></a></li><li><a href="/2021/07/css-tutorial-css-padding-property.html" target="_blank"><b>People Also Read :- CSS Padding Property </b></a></li><li><a href="/2021/06/css-tutorials-css-border-property.html" target="_blank"><b>People Also Read :- CSS Border Property</b></a></li></ul><p></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-89742445035034510152021-08-04T08:09:00.001-07:002021-08-04T08:09:42.904-07:00CSS Tutorials :- CSS Fonts Property <div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-kR0InGyQXVQ/YQqrtLynaMI/AAAAAAAAXWE/Jbjaxibp-Xgm8R2Kf7tZeriQma6nAdScwCLcBGAsYHQ/s1280/font%2Bproperty.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-kR0InGyQXVQ/YQqrtLynaMI/AAAAAAAAXWE/Jbjaxibp-Xgm8R2Kf7tZeriQma6nAdScwCLcBGAsYHQ/s16000/font%2Bproperty.jpg" /></a></div><p>Hey Friends, Today we are going to discuss CSS fonts. But before starting the article, I have to clear a thing that, font is part of both <b>Html and CSS</b>. In Html, we just placed our font and after it, we apply the property of the font using CSS. In a website, font played a <b>very important</b> role to look your website more beautiful and stylish. So let’s started our today’s topic <b>CSS Fonts</b>.</p><p><b><span style="font-size: x-large;">CSS Fonts</span></b></p><p><b>CSS Fonts property</b> is used to control the texture of your website. By using this property you can change anything of your font just like <b>text, font-family, bold, italic, color</b>, and many more thing. We can see these properties one by one in the below examples. But before it lets me cover some important font attributes. These are listed below:- </p><p></p><ul style="text-align: left;"><li><b>CSS Font Color</b></li><li><b>CSS Font Family</b></li><li><b>CSS Font Weight</b></li><li><b>CSS Font Style</b></li><li><b>CSS Font Size</b></li></ul><p></p><p><span style="font-size: x-large;"><b>CSS Font Color</b></span></p><p>This Font CSS Property is used to change the color of the text of your web pages. You can change the text color in three different ways. These different ways are:- </p><p></p><ul style="text-align: left;"><li><b>By Color Name</b></li><li><b>By Hexadecimal Value</b></li><li><b>By RGB Value</b></li></ul><p></p><p>In the above example, we define all 3 ways to change text color.</p><p> <b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><br /><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">h1</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">red</span>;</div><div> }</div><div> <span style="color: maroon;">h2</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">123</span>, <span style="color: #098658;">98</span>, <span style="color: #098658;">235</span>);</div><div> }</div><div> <span style="color: maroon;">h3</span>{</div><div> <span style="color: red;">color</span>: <span style="color: #0451a5;">#33FFDA</span>;</div><div> }</div><br /><div><span style="color: maroon;"></style></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><h1></span> This is Heading Number 1. <span style="color: maroon;"></h1></span></div><br /><div> <span style="color: maroon;"><h2></span> This is Heading Number 2.<span style="color: maroon;"></h2></span></div><br /><div> <span style="color: maroon;"><h3></span> This is Heading Number 3. <span style="color: maroon;"></h3></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div><p><span><b>Output:-</b></span></p><p><span></span></p><div class="separator" style="clear: both; text-align: center;"><span><a href="https://1.bp.blogspot.com/-154tjHKMs1g/YQqoLCTOGUI/AAAAAAAAXVc/hhlkGSyFjAQwESiD9VS7wUIxx-16OQatgCLcBGAsYHQ/s525/font%2Bcolor.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="278" data-original-width="525" src="https://1.bp.blogspot.com/-154tjHKMs1g/YQqoLCTOGUI/AAAAAAAAXVc/hhlkGSyFjAQwESiD9VS7wUIxx-16OQatgCLcBGAsYHQ/s16000/font%2Bcolor.JPG" /></a></span></div><span><b><br /></b></span><p></p><p><span style="font-size: x-large;"><b>CSS Font Family</b></span></p><p>This font CSS property is used to change the font of your web pages. You can provide any type of value to it. Just like: - Arial, Times New Roman, Monospace, Arial Bold, etc. </p><p><b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span> </div><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">h1</span> {</div><div> <span style="color: red;">font-family</span>: <span style="color: #0451a5;">sans-serif</span>;</div><div> }</div><br /><div> <span style="color: maroon;">h2</span> {</div><div> <span style="color: red;">font-family</span>: <span style="color: #0451a5;">Arial</span> <span style="color: #0451a5;">Impact</span>, Haettenschweiler, <span style="color: #a31515;">'Arial Narrow Bold'</span>, <span style="color: #0451a5;">sans-serif</span>;</div><div> }</div><br /><div> <span style="color: maroon;">h3</span> {</div><div> <span style="color: red;">font-family</span>: <span style="color: #0451a5;">Impact</span>;</div><div> }</div><div><span style="color: maroon;"></style></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><h1></span> This is Heading Number 1. <span style="color: maroon;"></h1></span></div><br /><div> <span style="color: maroon;"><h2></span> This is Heading Number 2.<span style="color: maroon;"></h2></span></div><br /><div> <span style="color: maroon;"><h3></span> This is Heading Number 3. <span style="color: maroon;"></h3></span></div><div><span style="color: maroon;"></body></span></div><br /><div><span style="color: maroon;"></html></span></div></div></div><p><span><b>Output:- </b></span></p><p><span></span></p><div class="separator" style="clear: both; text-align: center;"><span><a href="https://1.bp.blogspot.com/-ko7mcpsxIi0/YQqoSuEVs5I/AAAAAAAAXVg/O4yvc3t2luwOotoX2k-VMRIYVLwc71T9gCLcBGAsYHQ/s627/Font%2BFamily.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="310" data-original-width="627" src="https://1.bp.blogspot.com/-ko7mcpsxIi0/YQqoSuEVs5I/AAAAAAAAXVg/O4yvc3t2luwOotoX2k-VMRIYVLwc71T9gCLcBGAsYHQ/s16000/Font%2BFamily.JPG" /></a></span></div><p></p><p><span style="font-size: x-large;"><b>CSS Font Weight</b></span></p><p>This Font Property is defined. how bold your text is. There are some different values by applying it you can change the font-weight accordingly to you. You can also use some predefined values such as Bold, Normal, Bolder, Light, etc.</p><p><b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div><span style="color: maroon;"><title></span> This is title. <span style="color: maroon;"></title></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">style</span>=<span style="color: blue;">"</span><span style="color: blue;">font-weight: lighter;</span><span style="color: blue;">"</span><span style="color: maroon;">></span> This is 1st Paragraph. <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">style</span>=<span style="color: blue;">"</span><span style="color: blue;">font-weight: bolder;</span><span style="color: blue;">"</span><span style="color: maroon;">></span> This is 2nd Paragraph. <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">style</span>=<span style="color: blue;">"</span><span style="color: blue;">font-weight: 800;</span><span style="color: blue;">"</span><span style="color: maroon;">></span> This is 3rd paragraph. <span style="color: maroon;"></p></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span><span style="background-color: transparent;"> </span></div></div></div><p><b><span>Output:-</span></b></p><p><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://1.bp.blogspot.com/-ij-Vhi2c0_8/YQqoZWZgLvI/AAAAAAAAXVk/34TeSZj0tusmBt3f69WiROi59AvSwHgMwCLcBGAsYHQ/s556/font%2Bweight.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="221" data-original-width="556" src="https://1.bp.blogspot.com/-ij-Vhi2c0_8/YQqoZWZgLvI/AAAAAAAAXVk/34TeSZj0tusmBt3f69WiROi59AvSwHgMwCLcBGAsYHQ/s16000/font%2Bweight.JPG" /></a></b></div><b><span><br /></span></b><p></p><p><b><span style="font-size: x-large;">CSS Font Style</span></b></p><p>This property defines that how your text will appear on your webpage. It may be normal, bold, italic, oblique, etc. </p><p><b>Example:-</b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div><span style="color: maroon;"><title></span> This is title. <span style="color: maroon;"></title></span></div><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">#para1</span>{</div><div> <span style="color: red;">font-style</span>: <span style="color: #0451a5;">italic</span>;</div><div> }</div><div> <span style="color: maroon;">#para2</span>{</div><div> <span style="color: red;">font-style</span>: <span style="color: #0451a5;">normal</span>;</div><div> }</div><div> <span style="color: maroon;">#para3</span>{</div><div> <span style="color: red;">font-style</span>: <span style="color: #0451a5;">oblique</span>;</div><div> }</div><div><span style="color: maroon;"></style></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">id</span> = <span style="color: blue;">"para1"</span><span style="color: maroon;">></span> This is 1st Paragraph. <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">id</span> = <span style="color: blue;">"para2"</span><span style="color: maroon;">></span> This is 2nd Paragraph. <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">id</span> = <span style="color: blue;">"para3"</span><span style="color: maroon;">></span> This is 3rd paragraph. <span style="color: maroon;"></p></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div><p><b><span>Output:-</span></b></p><p><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://1.bp.blogspot.com/-KhZLkqrA68A/YQqoge2HvlI/AAAAAAAAXVs/uG3OyoWAR2YT3UVc-azLLQdLIbbTzHSjgCLcBGAsYHQ/s410/font%2Bstyle.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="217" data-original-width="410" src="https://1.bp.blogspot.com/-KhZLkqrA68A/YQqoge2HvlI/AAAAAAAAXVs/uG3OyoWAR2YT3UVc-azLLQdLIbbTzHSjgCLcBGAsYHQ/s16000/font%2Bstyle.JPG" /></a></b></div><b><span><br /></span></b><p></p><p><b><span style="font-size: x-large;">CSS Font Size</span></b></p><p>It define the size of the font appear on your webpages. It should be small, normal, medium, large. </p><div><b>Example:-</b></div><div><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div><span style="color: maroon;"><title></span> This is title. <span style="color: maroon;"></title></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">style</span>=<span style="color: blue;">"</span><span style="color: blue;">font-size:small;</span><span style="color: blue;">"</span><span style="color: maroon;">></span> This font size is small<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">style</span>=<span style="color: blue;">"</span><span style="color: blue;">font-size:large;</span><span style="color: blue;">"</span><span style="color: maroon;">></span> This font size is large. <span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">style</span>=<span style="color: blue;">"</span><span style="color: blue;">font-size:200%;</span><span style="color: blue;">"</span><span style="color: maroon;">></span> This font size is set on 200%. <span style="color: maroon;"></p></span> </div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div></div><p><b>Output :-</b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-4RTD6TJcnQY/YQqotyoIwLI/AAAAAAAAXV4/DTuMyq6zrQEh8ByKWD3D9oJLZfcKyxjPQCLcBGAsYHQ/s572/font%2Bsize.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="572" src="https://1.bp.blogspot.com/-4RTD6TJcnQY/YQqotyoIwLI/AAAAAAAAXV4/DTuMyq6zrQEh8ByKWD3D9oJLZfcKyxjPQCLcBGAsYHQ/s16000/font%2Bsize.JPG" /></a></div><br /><b><u><a href="/2021/07/css-tutorial-css-padding-property.html" target="_blank">People Also Read :- CSS Padding Property</a></u></b><div><b><u><br /></u></b></div><div><b><u><a href="/2021/06/css-tutorials-css-margin-property.html" target="_blank">People Also Read :- CSS Margin Property</a><br /></u></b><div><p></p><div><b><br /></b></div></div></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-21714526000204904762021-07-06T07:27:00.000-07:002021-07-06T07:27:02.434-07:00CSS Tutorial :- CSS Padding Property<p><span style="color: red; font-size: x-large;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="color: red; font-size: x-large;"><a href="https://1.bp.blogspot.com/-9RjAYMwTbB8/YORnKoGgsdI/AAAAAAAAW_Q/dOr6RnJ8HjUObybUdZqeS-P1BzvXrmayACLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-9RjAYMwTbB8/YORnKoGgsdI/AAAAAAAAW_Q/dOr6RnJ8HjUObybUdZqeS-P1BzvXrmayACLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.jpg" /></a></span></div><p></p><p><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS PADDING</b></span></p><p>CSS Padding Property is used to give some space between the element content and element border. Just like margin you can provide the padding from the <b>top, bottom, left, right,</b> etc. You can independently apply padding on the element using separate properties. And you can also apply padding property at once by using shorthand property. </p><p>But, Padding and margin property both are different from each other. The difference between margin and padding was the margin property would have applied outside the element. But the padding property would have applied inside the element.</p><p><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS Padding Properties</b></span></p><p></p><ol style="text-align: left;"><li><b>Padding: -</b> This property is used to set padding in one declaration. </li><li><b>Padding-top: -</b> This property is used to set padding at the top. </li><li><b>Padding-right: -</b> It is used to set the padding from the right side of the element. </li><li><b>Padding-bottom: -</b> It is used to set the padding from the bottom of the element. </li><li><b>Padding-left: -</b> This property was applied from the left side of the element. </li></ol><p></p><p><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">CSS Padding Values</span></b></p><p><b>The Value of padding can be set in Four ways: -</b></p><p></p><ol style="text-align: left;"><li><b>Length: -</b> It Specifies padding in <b>px, pt, cm</b> etc. </li><li><b>% (percentage): -</b> It define padding in<b> % percentages</b>. </li><li><b>Initial: - </b>It set the padding at <b>default values</b>.</li><li><b>Inherit: -</b> It inherits padding from its <b>parent elements</b>. </li></ol><p></p><p><b>Example: - </b></p><div class="codeblock"> <div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><!DOCTYPE</span> <span style="color: red;">html</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><html></span></div><br /><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">.container</span> {</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> }</div><br /><div> <span style="color: maroon;">#first</span>,</div><div> <span style="color: maroon;">#second</span> {</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">2px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">30%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">120px</span>;</div><div> <span style="color: green;">/* padding: 23px 23px 23px 23px; */</span></div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">23px</span>;</div><div> }</div><div> <span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><br /><div> <span style="color: maroon;"><h1></span> Padding Property <span style="color: maroon;"></h1></span></div><br /><div> <span style="color: maroon;"><div</span> <span style="color: red;">class</span>=<span style="color: blue;">"container"</span><span style="color: maroon;">></span></div><div><span style="color: maroon;"><p</span> <span style="color: red;">id</span>=<span style="color: blue;">"first"</span><span style="color: maroon;">><b></span> This is First Paragraph.<span style="color: maroon;"></b><br><br></span> Lorem ipsum, dolor</div><div> sit amet consectetur adipisicing elit.</div><div>Assumenda libero impedit omnis voluptatibus, in neque </div><div>nulla sed quis voluptatum repellat! Hic, cumque vero!<span style="color: maroon;"></p></span></div><div> </div><div><span style="color: maroon;"><p</span> <span style="color: red;">id</span>=<span style="color: blue;">"second"</span><span style="color: maroon;">></span> <span style="color: maroon;"><b></span> This is Second paragraph.<span style="color: maroon;"></b><br><br></span> lsdjlajsdljaldsj</div><div>asdjflasjdflajsdlfjasldfjlas dflads flaskdj fl asdjflkasd flasdjflkasd </div><div>jflkasdjfil asdflkasdjf jdlasd flsad flkasdjf lasdfj lasdf alskdjfalsk dfjlaksd</div><div>faslkdfj alskdfjlaksd jflasdjflk .<span style="color: maroon;"></p></span></div><div> </div><div> <span style="color: maroon;"></div></span></div><br /><div><span style="color: maroon;"></body></span></div><br /><div><span style="color: maroon;"></html></span></div></div></div><p><b> Ouput: - </b></p><p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-BdtVjIVWImY/YORlLEMQ4wI/AAAAAAAAW_A/KTFow0o-9o0h-5BqRvEvQNs_EmMdn02TgCLcBGAsYHQ/s899/without%2Bpadding.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="343" data-original-width="899" src="https://1.bp.blogspot.com/-BdtVjIVWImY/YORlLEMQ4wI/AAAAAAAAW_A/KTFow0o-9o0h-5BqRvEvQNs_EmMdn02TgCLcBGAsYHQ/s16000/without%2Bpadding.JPG" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><b>Without Padding</b></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-cOHJpskR_lE/YORlVCSwBZI/AAAAAAAAW_E/aDMxH6BM3oAc9pSnzZHp4JbHlXwVCLNMACLcBGAsYHQ/s1023/Example.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="398" data-original-width="1023" src="https://1.bp.blogspot.com/-cOHJpskR_lE/YORlVCSwBZI/AAAAAAAAW_E/aDMxH6BM3oAc9pSnzZHp4JbHlXwVCLNMACLcBGAsYHQ/s16000/Example.JPG" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><b>With Padding</b></td></tr></tbody></table><br /><b><br /></b></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com9tag:blogger.com,1999:blog-5772613978371078598.post-32186992872288454472021-07-02T00:02:00.003-07:002021-07-02T06:36:09.835-07:00Introduction of Loop in C Programming Language. <div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-KfgiJ8QzlXw/YN65_q21zSI/AAAAAAAAW5I/3-r0dG8N0NI4FquB02NL4xXa4xzX-PtiQCLcBGAsYHQ/s2048/C%2BProgramming.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1152" data-original-width="2048" src="https://1.bp.blogspot.com/-KfgiJ8QzlXw/YN65_q21zSI/AAAAAAAAW5I/3-r0dG8N0NI4FquB02NL4xXa4xzX-PtiQCLcBGAsYHQ/s16000/C%2BProgramming.jpg" /></a></div><p>Has it ever happened to you that in C programming you have to print a code of block several times? And you have to write that <b>code again and again</b>. If you write the same thing several times. Then your code will get<b> long, complex, and difficult to read. </b></p><p>And didn’t want to write the same code again and again. So what is its solution? The Solution is Loop. Loop that statement until <b>the condition is not satisfied</b>. Let’s talk about the loop. What is a loop? How its work? etc. etc. </p><div><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Introduction of Loop</span></h1><div>The Loop is used to execute a <b>statement until the condition of the code is not satisfy</b>. In simple words, a loop provides us to execute a group of statements or multiple instructions multiple times. For Example, if you have to print 1-10 numbers then instead of using printf statement 10 times, we can use printf inside the loop which runs up to 10 iterations.</div></div><div><br /></div><div><h2 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Advantages of Loop</span></h2><div><ol style="text-align: left;"><li>The first and main thing of the loop is we didn’t write the same code again and again.</li><li>Reduce the length of the code. </li><li>The Code is readable. And easy to understand.</li><li>It provides the code reusability. </li><li>Loop takes less memory space comparing (write the code several times)</li></ol></div></div><div><p class="MsoNormal"><b>There are mainly 3 types of loops available in the C programming language. These are:- </b><o:p></o:p></p> <p class="MsoNormal"></p><ol style="text-align: left;"><li><b>While Loop</b></li><li><b>For Loop </b></li><li><b>Do-While Loop </b></li></ol><o:p></o:p><p></p> <p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal">Let’s See a simple example of a loop. <o:p></o:p></p><div style="text-align: left;"><b><span style="font-size: large;">Write a program to print the First 50 natural numbers using the loop.</span></b></div><div style="text-align: left;"><b><span style="color: red; font-size: large;"><br /></span></b></div><p class="MsoNormal"><b><span style="color: red;">A natural number is a positive number (counting) so don’t be confused about it.</span></b></p><div class="codeblock"><div style="color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><div style="color: black; line-height: 19px;"><div><span style="color: #af00db;"><br /></span></div><div><span style="color: #af00db;">#include</span><span style="color: #a31515;"><stdio.h></span></div><br /><div><span style="color: blue;">int</span> <span style="color: #795e26;">main</span>()</div><div>{</div><div> <span style="color: blue;">int</span> i;</div><br /><div> <span style="color: #af00db;">for</span> (i=<span style="color: #098658;">1</span>; i<=<span style="color: #098658;">50</span>; i++)</div><div> {</div><div> <span style="color: #795e26;">printf</span>(<span style="color: #a31515;">"%d </span><span style="color: #ee0000;">\n</span><span style="color: #a31515;">"</span>, i);</div><div> }</div><div> <span style="color: #af00db;">return</span> <span style="color: #098658;">0</span>;</div><div>}</div></div></div></div></div><p class="MsoNormal"><b>Output:- </b></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ikDdnCbVlsg/YN6378koUmI/AAAAAAAAW48/WEbE5OH39Uke_HL8bkYDXTETqxxkSfTxACLcBGAsYHQ/s550/example.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="392" data-original-width="550" src="https://1.bp.blogspot.com/-ikDdnCbVlsg/YN6378koUmI/AAAAAAAAW48/WEbE5OH39Uke_HL8bkYDXTETqxxkSfTxACLcBGAsYHQ/s16000/example.JPG" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-oHDqNYGrlio/YN6375xQvRI/AAAAAAAAW44/elmKdfxr1b4s_EARaB8xhHT9c6wHTSlQgCLcBGAsYHQ/s640/example%2B2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="497" data-original-width="640" src="https://1.bp.blogspot.com/-oHDqNYGrlio/YN6375xQvRI/AAAAAAAAW44/elmKdfxr1b4s_EARaB8xhHT9c6wHTSlQgCLcBGAsYHQ/s16000/example%2B2.JPG" /></a></div><p></p><p class="MsoNormal">Look at the <b>length of the code.</b> Using the loop the length of the<b> code is reduced</b>. If we have to print 50 numbers without using a loop then we have to write printf statement <b>50 times</b>. And think if I said to you that, you have to print 50 lakh numbers. I bet, you are not going to do it at any cost. Writing printf statement <b>50 lakh times</b> is not an easy job.</p></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-433009718599259842021-07-01T06:36:00.006-07:002021-07-06T07:25:21.459-07:00CSS Tutorials : CSS Opacity Property<h1 style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-QhUTZkmOFDQ/YN2fy5VSdGI/AAAAAAAAW4M/Wqd7ti5ZL8UUT1cyLIEgn76EujqMvqwkgCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-QhUTZkmOFDQ/YN2fy5VSdGI/AAAAAAAAW4M/Wqd7ti5ZL8UUT1cyLIEgn76EujqMvqwkgCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.jpg" /></a></div></h1><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">CSS Opacity</span></h1><div>The CSS Opacity property is used to specify the transparency of the Html element. In other words, You can also say that it specifies the clarity of the element. </div><div><br /></div><div>The Opacity property value takes from <b>0.0 to 1.0</b>. The <b>lower value, the more transparency</b>. Look at the image below. </div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-bGKB5WW8_2Q/YN2WxgHKlqI/AAAAAAAAW3s/yfUNC7pd0WA4hm6sraN3SWjNuX-dDeCowCLcBGAsYHQ/s860/exmaple.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="319" data-original-width="860" src="https://1.bp.blogspot.com/-bGKB5WW8_2Q/YN2WxgHKlqI/AAAAAAAAW3s/yfUNC7pd0WA4hm6sraN3SWjNuX-dDeCowCLcBGAsYHQ/s16000/exmaple.JPG" /></a></div><div><div>The <b>First Image</b> that you see in the example has<b> 0.2 Opacity</b>. The <b>Second image</b> has <b>0.5</b> and the last image has a <b>default value of 1. </b></div><div><br /></div><div><b>Look at the Code below to understand how its works. </b></div></div><div><div style="background: rgb(30, 30, 30); line-height: 14.25pt; margin-bottom: 0.0001pt; text-align: left;"><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><!</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">DOCTYPE</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">html</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">html</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">head</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">style</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: #d7ba7d; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#img1</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> {<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">opacity</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: </span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">0.2</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}<br /></span><span style="color: #d7ba7d; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#img2</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">{<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">opacity</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: </span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">0.5</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}<br /></span><span style="color: #d7ba7d; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#img3</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">{<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">opacity</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: </span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">1</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}<br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">style</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">head</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">body</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">h1</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Transparent Images</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">h1</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">img</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">id</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> =</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"img1"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">src</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"1.jpg"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">width</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"270"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">height</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"200"</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">img</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">id</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> =</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"img2"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">src</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"2.jpg"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">width</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"270"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">height</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"200"</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">img</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">id</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> =</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"img3"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">src</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"3.jpg"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">width</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"270"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #9cdcfe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">height</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">=</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"200"</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">body</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></</span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">html</span><span style="color: grey; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">><br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span></div></div><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Transparent Boxes </span></h1><div><div>You can also use the opacity property to transparent the box or text area. Look at the example below.</div><div><br /></div><div><b>Example:- </b></div></div><div><br /></div><div><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: grey;"><!</span><span style="color: #569cd6;">DOCTYPE</span> <span style="color: #9cdcfe;">html</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">html</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">head</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">style</span><span style="color: grey;">></span></div><div><span style="color: #d7ba7d;">p</span>{ </div><div> <span style="color: #9cdcfe;">background-color</span>: <span style="color: #ce9178;">chocolate</span>;</div><div> <span style="color: #9cdcfe;">padding</span>: <span style="color: #b5cea8;">10px</span>;</div><div>}</div><div><span style="color: #d7ba7d;">#p1</span> {</div><div> <span style="color: #9cdcfe;">opacity</span>: <span style="color: #b5cea8;">1</span>;</div><div>}</div><div><span style="color: #d7ba7d;">#p2</span>{</div><div> <span style="color: #9cdcfe;">opacity</span>: <span style="color: #b5cea8;">0.5</span>;</div><div>}</div><div><span style="color: #d7ba7d;">#p3</span>{</div><div> <span style="color: #9cdcfe;">opacity</span>: <span style="color: #b5cea8;">0.2</span>;</div><div>}</div><div><span style="color: grey;"></</span><span style="color: #569cd6;">style</span><span style="color: grey;">></span></div><div><span style="color: grey;"></</span><span style="color: #569cd6;">head</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">body</span><span style="color: grey;">></span></div><br /><div><span style="color: grey;"><</span><span style="color: #569cd6;">h1</span><span style="color: grey;">></span>Transparent Boxes<span style="color: grey;"></</span><span style="color: #569cd6;">h1</span><span style="color: grey;">></span></div><br /><div><span style="color: grey;"><</span><span style="color: #569cd6;">p</span> <span style="color: #9cdcfe;">id</span> = <span style="color: #ce9178;">"p1"</span><span style="color: grey;">></span> Opacity 1<span style="color: grey;"></</span><span style="color: #569cd6;">p</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">p</span> <span style="color: #9cdcfe;">id</span> = <span style="color: #ce9178;">"p2"</span><span style="color: grey;">></span> Opacity 0.5<span style="color: grey;"></</span><span style="color: #569cd6;">p</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">p</span> <span style="color: #9cdcfe;">id</span> = <span style="color: #ce9178;">"p3"</span><span style="color: grey;">></span> Opacity 0.2<span style="color: grey;"></</span><span style="color: #569cd6;">p</span><span style="color: grey;">></span></div><br /><br /><div><span style="color: grey;"></</span><span style="color: #569cd6;">body</span><span style="color: grey;">></span></div><div><span style="color: grey;"></</span><span style="color: #569cd6;">html</span><span style="color: grey;">></span></div><br /></div></div><p><b>Output :- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-FVkNT6xvPZs/YN2Xo7xBlgI/AAAAAAAAW30/-RoEryeut_k6d4fgWCD9nu5W2wVpZbaFACLcBGAsYHQ/s681/Transparent%2BBox.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="381" data-original-width="681" src="https://1.bp.blogspot.com/-FVkNT6xvPZs/YN2Xo7xBlgI/AAAAAAAAW30/-RoEryeut_k6d4fgWCD9nu5W2wVpZbaFACLcBGAsYHQ/s16000/Transparent%2BBox.JPG" /></a></div><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Apply Hover Effect Using Opacity</span></h1><p>You can also hover over the image in the form of opacity. Let's Try it </p><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: grey;"><!</span><span style="color: #569cd6;">DOCTYPE</span> <span style="color: #9cdcfe;">html</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">html</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">head</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">style</span><span style="color: grey;">></span></div><div><span style="color: #d7ba7d;">img:hover</span>{</div><div> <span style="color: #9cdcfe;">opacity</span>: <span style="color: #b5cea8;">0.5</span>;</div><div>}</div><div><span style="color: grey;"></</span><span style="color: #569cd6;">style</span><span style="color: grey;">></span></div><div><span style="color: grey;"></</span><span style="color: #569cd6;">head</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">body</span><span style="color: grey;">></span></div><br /><div><span style="color: grey;"><</span><span style="color: #569cd6;">h1</span><span style="color: grey;">></span> Hover Property <span style="color: grey;"></</span><span style="color: #569cd6;">h1</span><span style="color: grey;">></span></div><br /><div><span style="color: grey;"><</span><span style="color: #569cd6;">img</span> <span style="color: #9cdcfe;">id</span> =<span style="color: #ce9178;">"img1"</span> <span style="color: #9cdcfe;">src</span>=<span style="color: #ce9178;">"1.jpg"</span> <span style="color: #9cdcfe;">width</span>=<span style="color: #ce9178;">"270"</span> <span style="color: #9cdcfe;">height</span>=<span style="color: #ce9178;">"200"</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">img</span> <span style="color: #9cdcfe;">id</span> =<span style="color: #ce9178;">"img2"</span> <span style="color: #9cdcfe;">src</span>=<span style="color: #ce9178;">"2.jpg"</span> <span style="color: #9cdcfe;">width</span>=<span style="color: #ce9178;">"270"</span> <span style="color: #9cdcfe;">height</span>=<span style="color: #ce9178;">"200"</span><span style="color: grey;">></span></div><div><span style="color: grey;"><</span><span style="color: #569cd6;">img</span> <span style="color: #9cdcfe;">id</span> =<span style="color: #ce9178;">"img3"</span> <span style="color: #9cdcfe;">src</span>=<span style="color: #ce9178;">"3.jpg"</span> <span style="color: #9cdcfe;">width</span>=<span style="color: #ce9178;">"270"</span> <span style="color: #9cdcfe;">height</span>=<span style="color: #ce9178;">"200"</span><span style="color: grey;">></span></div><br /><div><span style="color: grey;"></</span><span style="color: #569cd6;">body</span><span style="color: grey;">></span></div><div><span style="color: grey;"></</span><span style="color: #569cd6;">html</span><span style="color: grey;">></span></div></div> <p><b> Ouput :- </b></p><h2 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Before Hover </span></h2><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ihn4ODY48MA/YN2cO9g2JzI/AAAAAAAAW38/QTwg5K7bHqcNrc5xbq_WBpQJ9Rql55JFgCLcBGAsYHQ/s956/Before%2BHover.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="413" data-original-width="956" src="https://1.bp.blogspot.com/-ihn4ODY48MA/YN2cO9g2JzI/AAAAAAAAW38/QTwg5K7bHqcNrc5xbq_WBpQJ9Rql55JFgCLcBGAsYHQ/s16000/Before%2BHover.JPG" /></a></div><h2 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">After Hover</span></h2><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-xyvmB4s_Img/YN2cUzHEltI/AAAAAAAAW4A/7PteTSrgE2MourLU6XSVKv559BNVNWK6wCLcBGAsYHQ/s852/After%2BHover.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="432" data-original-width="852" src="https://1.bp.blogspot.com/-xyvmB4s_Img/YN2cUzHEltI/AAAAAAAAW4A/7PteTSrgE2MourLU6XSVKv559BNVNWK6wCLcBGAsYHQ/s16000/After%2BHover.jpg" /></a></div><div class="separator" style="clear: both; text-align: left;">That's All of today guys hope you all understand this opacity property very well. If you have any doubt comment below we will definitely try to solve it. </div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com2tag:blogger.com,1999:blog-5772613978371078598.post-6945269472805191762021-06-28T05:14:00.003-07:002021-06-28T07:09:30.240-07:00C Switch Statement in C Programming Language.<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-5b7LgzdPJJE/YNm67gJGE7I/AAAAAAAAW2g/WGMWtDVbLZoOn_9KxKJQlMtiMjZtn5j2gCLcBGAsYHQ/s2048/C%2BProgramming.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1152" data-original-width="2048" src="https://1.bp.blogspot.com/-5b7LgzdPJJE/YNm67gJGE7I/AAAAAAAAW2g/WGMWtDVbLZoOn_9KxKJQlMtiMjZtn5j2gCLcBGAsYHQ/s16000/C%2BProgramming.jpg" /></a></div><p>In this tutorial, we are going to learn about Switch Statement in the C programming language. We have already seen <b>if, if-else, nested if-else</b>, condition, etc. If you haven’t read those tutorials then first go and read those tutorials then read them. </p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Topics that cover today.</span></h1><p></p><ol style="text-align: left;"><li><b>C switch statement</b></li><li><b>C Switch Syntax</b></li><li><b>Flow chart of C Switch Statement</b></li><li><b>Example of C switch statements</b></li></ol><p></p><p><b>So let’s go with our today’s topic. </b></p><h1 style="text-align: left;"><u><span style="background-color: #fff2cc; color: red;">C Switch Statement</span></u></h1><p>The C switch statement is used to execute a code block among many alternatives statements. The Switch statement allows the variable to be tested with the statement( Values) also known as Case written in the switch statement and if the statement is<b> verified(true)</b> with a statement then the code written between that statement will execute and then the rest of the code will start executing.</p><p>The same thing is also done by the if-else condition. But the syntax of the switch condition is easier to read and understandable for the programmers.</p><h1 style="text-align: left;"><b><span style="background-color: #fff2cc; color: red;">C Switch Statements Syntax.</span></b></h1><div><div style="background: rgb(30, 30, 30); line-height: 14.25pt; margin-bottom: 0.0001pt; text-align: left;"><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">switch</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> (expression)<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">{<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">case</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> constant-expression1 :<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> statements;<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">break</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">; </span><span style="color: #6a9955; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">/* The break function is optional */<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">case</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> constant-expression1 :<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> statements;<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">break</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">; <br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> .<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> .<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> .<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> .<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">default</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">:<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">default</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> statements;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}</span></div> </div><div><br /></div><div><div><b><span style="color: red;">Note: - The Break statement in the switch is not </span><span style="color: #38761d;">compulsory</span><span style="color: red;"> (optional) to add to the program. If the programmer wanted to execute the default statement then the break statement is not added to the program.</span></b></div><div><b><span style="color: red;"><br /></span></b></div><div><b><span style="color: red;">If none of the statements matched with the expression then by default statement is automatically displayed on the output screen.</span></b></div></div><h1 style="text-align: left;"><u><span style="background-color: #fff2cc; color: red;">Flow chart of the Switch Statement</span></u></h1><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-FGijUOtjBJM/YNm5EidiJsI/AAAAAAAAW2E/-N0y7YmDaJ4M55j5n0NNRnefQsV3GnZogCLcBGAsYHQ/s496/flow%2Bchart.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="496" data-original-width="496" src="https://1.bp.blogspot.com/-FGijUOtjBJM/YNm5EidiJsI/AAAAAAAAW2E/-N0y7YmDaJ4M55j5n0NNRnefQsV3GnZogCLcBGAsYHQ/s16000/flow%2Bchart.jpeg" /></a></div><h1 style="text-align: left;"><u><span style="background-color: #fff2cc; color: red;">Example of Switch Statement</span></u></h1><h2 style="text-align: left;"><b><i>Program to find whether a number is even, odd or negative.</i></b></h2><div style="background: rgb(30, 30, 30); line-height: 14.25pt; margin-bottom: 0.0001pt; text-align: left;"><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#include</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><stdio.h><br /></span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">int</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #dcdcaa; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">main</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">()<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">{<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #569cd6; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">int</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> number;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #dcdcaa; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">printf</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"Enter a number: "</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">);<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #dcdcaa; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">scanf</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"%d"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">,&number);<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">switch</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">( number%</span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">2</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> )<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> {<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">case</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">0</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">:<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #dcdcaa; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">printf</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"%d is even."</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">, number);<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">break</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">case</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">1</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">:<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #dcdcaa; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">printf</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"%d is odd."</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">, number);<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">break</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">default</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">:<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #dcdcaa; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">printf</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: #ce9178; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">"Sorry...Number is Negative"</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">);<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> }<br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> <br /></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #c586c0; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">return</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #b5cea8; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">0</span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: #d4d4d4; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}</span></div><p> </p><p style="text-align: left;"><b>Output:-</b></p><p style="text-align: left;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-vxCzHo-JLi8/YNm6HAocjYI/AAAAAAAAW2M/St5z-lHOc24jl6x_zGkIF7JpOeH9r7ekQCLcBGAsYHQ/s469/even%2Bexample.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="177" data-original-width="469" src="https://1.bp.blogspot.com/-vxCzHo-JLi8/YNm6HAocjYI/AAAAAAAAW2M/St5z-lHOc24jl6x_zGkIF7JpOeH9r7ekQCLcBGAsYHQ/s16000/even%2Bexample.JPG" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-GDu2dU34R6I/YNm6HC9rktI/AAAAAAAAW2U/34yY0PXamNApqYCsKfbpX6TVTUk5eunagCLcBGAsYHQ/s475/negative.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="206" data-original-width="475" src="https://1.bp.blogspot.com/-GDu2dU34R6I/YNm6HC9rktI/AAAAAAAAW2U/34yY0PXamNApqYCsKfbpX6TVTUk5eunagCLcBGAsYHQ/s16000/negative.JPG" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-h99Y6wCw-7c/YNm6HCdXJeI/AAAAAAAAW2Q/f2TSx4HmVPssHfsfPdUf0TctN6BprLoYACLcBGAsYHQ/s493/odd%2Bexample.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="189" data-original-width="493" src="https://1.bp.blogspot.com/-h99Y6wCw-7c/YNm6HCdXJeI/AAAAAAAAW2Q/f2TSx4HmVPssHfsfPdUf0TctN6BprLoYACLcBGAsYHQ/s16000/odd%2Bexample.JPG" /></a></div><br /><a href="/2021/04/nested-if-else-in-c-programming.html" target="_blank"><b>People Also Read : Nested IF-Else in C Programming</b></a><p></p><p style="text-align: left;"><a href="/2020/09/c-instruction-with-example-in-c-language.html" target="_blank"><b>People Also Read : C Instruction With Example in C Language.</b></a></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com2tag:blogger.com,1999:blog-5772613978371078598.post-90027464366277367412021-06-25T06:39:00.001-07:002021-06-25T06:56:23.570-07:00CSS Tutorials : CSS Margin Property<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-jwLGV-WAPcU/YNXSimn8t9I/AAAAAAAAWxU/uHISnbmc83s-yGxyxaQO8HAi8OA4dJrzgCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-jwLGV-WAPcU/YNXSimn8t9I/AAAAAAAAWxU/uHISnbmc83s-yGxyxaQO8HAi8OA4dJrzgCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.jpg" /></a></div><p></p><h1 style="text-align: left;"><b><span style="background-color: #fff2cc; color: red;">CSS Margin</span></b></h1><p><b> CSS Margin property</b> is used to give space around Html elements. You can give some space to your Html elements using this CSS property. It is completely <b>transparent </b>you can’t see any <b>background color</b> when you give this property to elements.</p><p>You can also provide margins of Html elements independently such as <b>left, right, bottom and top.</b> </p><p>You can provide the margin of an Html element by using values like - auto, %, length, etc. we can talk about it after some time with a full example. </p><p><b><span style="background-color: #fff2cc; color: red;">The Margin CSS Property basically have 5 property these are: - </span></b></p><p></p><ol style="text-align: left;"><li><b>Margin</b>: - This CSS property will apply when the user wants to give margin value in one <b>declaration</b>. </li><li><b>Margin-left</b>: - This CSS property will only apply on the <b>left side</b> of the Html element.</li><li><b>Margin-top</b>: - This CSS property is used to set the margin on the <b>top side</b> of the Html element.</li><li><b>Margin-bottom</b>: - This CSS property is used to set a margin on the <b>bottom side</b> of the Html element.</li><li><b>Margin-right</b>: - This CSS property will only apply on the<b> right side </b>of the Html element.</li></ol><p></p><p><b><span style="background-color: #fff2cc; color: red;">Now, the margin CSS Property also has a different value these values are: -</span></b></p><p></p><ol style="text-align: left;"><li><b>Auto</b>: - This margin value is set by the browser <b>automatically</b>. </li><li><b>Length</b>: - This margin value is set by the user in <b>px, cm, pt</b>, etc</li><li><b>%</b>: - This margin value is set into %( percentages ) Like :- <b>25%, 30%</b> etc</li><li><b>Inherit</b>: - This margin value is used to inherit margin from its<b> parent element</b>.</li></ol><p></p><p><b><span style="background-color: #fff2cc; color: red;">Let’s see through An amazing example of this topic.</span></b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><br /></span></div><div><span style="color: maroon;"><html></span></div><br /><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><title></span> CSS Margin Property <span style="color: maroon;"></title></span></div><div> <span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">.container</span>{</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> }</div><div> <span style="color: maroon;">.box</span>{ </div><div> <span style="color: red;">width</span>: <span style="color: #098658;">216px</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">209px</span>;</div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">30px</span> <span style="color: #098658;">30px</span> <span style="color: #098658;">30px</span> <span style="color: #098658;">30px</span>;</div><div> }</div><div> <span style="color: maroon;">#box1</span> {</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">204</span>, <span style="color: #098658;">157</span>, <span style="color: #098658;">157</span>);</div><div> }</div><div> <span style="color: maroon;">#box2</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">green</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">157</span>, <span style="color: #098658;">204</span>, <span style="color: #098658;">182</span>);</div><div> }</div><div> <span style="color: maroon;">#box3</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">blue</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">219</span>, <span style="color: #098658;">230</span>, <span style="color: #098658;">121</span>);</div><div> }</div><div> <span style="color: maroon;">#box4</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">purple</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">163</span>, <span style="color: #098658;">158</span>, <span style="color: #098658;">233</span>);</div><div> }</div><div> <span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><div</span> <span style="color: red;">class</span> = <span style="color: blue;">"container"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>= <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box1"</span><span style="color: maroon;">></span> Box 1 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span> = <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box2"</span><span style="color: maroon;">></span> Box 2 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span> = <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box3"</span><span style="color: maroon;">></span> Box 3 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span> = <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box4"</span><span style="color: maroon;">></span> Box 4 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"></div></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"><br /></span></div><div><span style="color: maroon;"></html></span></div></div></div><p><b> Output :-</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-AXgmO_8PHYU/YNXSIS8ufCI/AAAAAAAAWxM/QKj1-MIBP70NirNrV33mZOm8gMDfhpfpQCLcBGAsYHQ/s1350/example.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="441" data-original-width="1350" src="https://1.bp.blogspot.com/-AXgmO_8PHYU/YNXSIS8ufCI/AAAAAAAAWxM/QKj1-MIBP70NirNrV33mZOm8gMDfhpfpQCLcBGAsYHQ/s16000/example.JPG" /></a></div><div><br /></div><div>In the above example, we have seen the margin CSS property. We provide margin property to all the boxes in a single declaration. Now we are going to give different CSS property to all boxes.</div><div><br /></div><div>But before the example let see an example in which we didn't give any margin in the Html document. Look at the image below in this image you will see that all the boxes are combined together. There is no space between them. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-QcjdYVXHGi4/YNXZWcUoOlI/AAAAAAAAWxs/SkvIAfag8aw1sWpErGX6FbH_ulWFKvE0QCLcBGAsYHQ/s914/before%2Bmargin.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="334" data-original-width="914" src="https://1.bp.blogspot.com/-QcjdYVXHGi4/YNXZWcUoOlI/AAAAAAAAWxs/SkvIAfag8aw1sWpErGX6FbH_ulWFKvE0QCLcBGAsYHQ/s16000/before%2Bmargin.JPG" /></a></div><div><br /></div><div><div>Now, look at the example below. In this example, we applied different margin properties to the different boxes. </div><div><br /></div><div><b>Example: - </b></div></div><div> <div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><title></span> CSS Margin Property <span style="color: maroon;"></title></span></div><div> <span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">*</span>{</div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">0%</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">209</span>, <span style="color: #098658;">190</span>, <span style="color: #098658;">190</span>);</div><div> }</div><div> <span style="color: maroon;">.container</span>{</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> }</div><div> <span style="color: maroon;">.box</span>{ </div><div> <span style="color: red;">width</span>: <span style="color: #098658;">216px</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">209px</span>;</div><div> <span style="color: red;">margin-left</span>: <span style="color: #098658;">30px</span>;</div><div> }</div><div> <span style="color: maroon;">#box1</span> {</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">204</span>, <span style="color: #098658;">157</span>, <span style="color: #098658;">157</span>);</div><div> }</div><div> <span style="color: maroon;">#box2</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">green</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">157</span>, <span style="color: #098658;">204</span>, <span style="color: #098658;">182</span>);</div><div> <span style="color: red;">margin-right</span>: <span style="color: #098658;">50px</span>;</div><div> }</div><div> <span style="color: maroon;">#box3</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">blue</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">219</span>, <span style="color: #098658;">230</span>, <span style="color: #098658;">121</span>);</div><div> <span style="color: red;">margin-top</span>: <span style="color: #098658;">100px</span>;</div><div> }</div><div> <span style="color: maroon;">#box4</span>{</div><div> <span style="color: red;">border</span>: <span style="color: #098658;">3px</span> <span style="color: #0451a5;">solid</span> <span style="color: #0451a5;">purple</span>;</div><div> <span style="color: red;">background-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">163</span>, <span style="color: #098658;">158</span>, <span style="color: #098658;">233</span>);</div><div> }</div><div> <span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><div</span> <span style="color: red;">class</span> = <span style="color: blue;">"container"</span><span style="color: maroon;">></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>= <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box1"</span><span style="color: maroon;">></span> Box 1 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span> = <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box2"</span><span style="color: maroon;">></span> Box 2 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span> = <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box3"</span><span style="color: maroon;">></span> Box 3 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span> = <span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box4"</span><span style="color: maroon;">></span> Box 4 <span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"></div></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div></div><p><b> Output: - </b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-CV282-QXQ00/YNXbQ1m3SlI/AAAAAAAAWx0/0Z9-O-JRFE0PD8T_Z40KzAupon7MMiCWgCLcBGAsYHQ/s1145/after%2Bmargin.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="458" data-original-width="1145" src="https://1.bp.blogspot.com/-CV282-QXQ00/YNXbQ1m3SlI/AAAAAAAAWx0/0Z9-O-JRFE0PD8T_Z40KzAupon7MMiCWgCLcBGAsYHQ/s16000/after%2Bmargin.JPG" /></a></div><br /><b><a href="/2021/06/css-tutorial-css-border-radius-property.html" target="_blank">People Also Read: - CSS Tutorial : CSS Border Radius Property</a></b><p></p><p><b><a href="/2021/06/css-tutorials-css-background-property.html" target="_blank">People Also Read: - CSS Tutorials :- CSS Background Property</a></b></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-21163133758252485262021-06-21T05:37:00.001-07:002021-06-22T22:49:47.870-07:00How to Make a Jpg image to pdf?<h1 style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-flu7xsVbSJA/YNCE4IToEMI/AAAAAAAAWuA/g2vjy22QmmsqyZWt0nwk_qGjIkj9yWMaACLcBGAsYHQ/s1920/How%2Bto%2BMake%2BImage%2Bto%2BPDF.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" src="https://1.bp.blogspot.com/-flu7xsVbSJA/YNCE4IToEMI/AAAAAAAAWuA/g2vjy22QmmsqyZWt0nwk_qGjIkj9yWMaACLcBGAsYHQ/s16000/How%2Bto%2BMake%2BImage%2Bto%2BPDF.jpg" /></a></div></h1><div style="text-align: left;">Converting an image into pdf is very easy but some people don’t know how to make a pdf of an image. So friend’s today tutorial based on it. I know a lot of people already know about it. If you know that great, but friend here, there are many other people who don’t know how to convert. In this tutorial, I am going to tell you many methods to convert an image into pdf. So Let’s Begin…</div><h1 style="text-align: left;"><span style="font-family: verdana;">OFFLINE METHOD</span></h1><p style="text-align: left;"><b><span style="background-color: #fff2cc; color: red; font-size: large;">In Window & laptop using MS Word</span></b></p><div>As we have written in our title you can make a pdf through MS Word. Here is the Step to make pdf through MS Word.</div><div><br /></div><div><b><span style="color: #2b00fe;">1. Open MS Word</span></b></div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-HFUjiBjUDcg/YNA0owGDZJI/AAAAAAAAWrw/6sdxgDVbujMNIx26fyV5WY8_2mKwJTdjwCLcBGAsYHQ/s1360/ms%2Bword.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="566" data-original-width="1360" src="https://1.bp.blogspot.com/-HFUjiBjUDcg/YNA0owGDZJI/AAAAAAAAWrw/6sdxgDVbujMNIx26fyV5WY8_2mKwJTdjwCLcBGAsYHQ/s16000/ms%2Bword.JPG" /></a></div><div><br /></div><b>2. <span style="color: #2b00fe;">Go to the Insert menu & Click on the picture option given on it.</span></b></div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-cn_EwipIppw/YNA0y6J9dgI/AAAAAAAAWr0/gyV70nAvX0gPbnENze8DdzdgFKJS3skbgCLcBGAsYHQ/s1211/Insert%2BPicture%2Boption.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="491" data-original-width="1211" src="https://1.bp.blogspot.com/-cn_EwipIppw/YNA0y6J9dgI/AAAAAAAAWr0/gyV70nAvX0gPbnENze8DdzdgFKJS3skbgCLcBGAsYHQ/s16000/Insert%2BPicture%2Boption.jpg" /></a></div><div><br /></div><b>3. <span style="color: #2b00fe;">Now Select the image which you want to convert into pdf.</span></b><span style="color: #2b00fe;"> </span></div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-V8X9ptWUyxA/YNA040NtmRI/AAAAAAAAWsI/BehtT9_Jc0g3vCiaJFkX3qWxR1bUFSdXACLcBGAsYHQ/s670/Insert%2Bimage.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="475" data-original-width="670" src="https://1.bp.blogspot.com/-V8X9ptWUyxA/YNA040NtmRI/AAAAAAAAWsI/BehtT9_Jc0g3vCiaJFkX3qWxR1bUFSdXACLcBGAsYHQ/s16000/Insert%2Bimage.JPG" /></a></div><div><br /></div><b>4. <span style="color: #2b00fe;">After it, press f12 key from your keyboard. </span></b></div><div><b><br />5. <span style="color: #2b00fe;">Select the location where you want to save your pdf.</span></b></div><div><b><br />6. <span style="color: #2b00fe;">Now select the save as type as .pdf and then press Enter to Save.</span></b></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-YTTd7xXcAoA/YNA1GXUJlvI/AAAAAAAAWsM/aZUZLoZ1R-Q3n7u2L-8-XwSraCb1jaC_QCLcBGAsYHQ/s667/Save%2Bas.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="551" data-original-width="667" src="https://1.bp.blogspot.com/-YTTd7xXcAoA/YNA1GXUJlvI/AAAAAAAAWsM/aZUZLoZ1R-Q3n7u2L-8-XwSraCb1jaC_QCLcBGAsYHQ/s16000/Save%2Bas.JPG" /></a></div><div><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">Using PowerPoint</span></h1><p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal">You can also convert an image to pdf using PowerPoint. You just need to follow the same procedure in PowerPoint as you followed in MS word. <o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-nB9i8lFbDDo/YNA1QFz37cI/AAAAAAAAWsU/cpBhogQdDWY-LClln_CIJ6vmlZ5vp6a2gCLcBGAsYHQ/s667/powerpnt.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="504" data-original-width="667" src="https://1.bp.blogspot.com/-nB9i8lFbDDo/YNA1QFz37cI/AAAAAAAAWsU/cpBhogQdDWY-LClln_CIJ6vmlZ5vp6a2gCLcBGAsYHQ/s16000/powerpnt.JPG" /></a></div><h1 style="text-align: left;">ONLINE METHOD</h1><div>If you have internet connectivity on your laptop or computer. Then you don’t need to follow the above steps. You just need to go to the website given below and just select the convert jpg to pdf option from the given options. And just drag the image on the window screen and press convert your image is successfully converted into pdf. </div><div><br /></div><div><b>Let’s see an example below.</b><br /></div></div><div><br /></div><div><span face=""Calibri","sans-serif"" style="font-size: 11pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"><b>Steps:- </b></span></div><div><span face=""Calibri","sans-serif"" style="font-size: 11pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"><br /></span></div><div><span style="line-height: 107%;"><span face="Calibri, sans-serif"><div style="font-size: 14.6667px;"><b>1. <span style="color: #2b00fe;">Open Google Chrome and go to the Search bar.</span></b><span style="color: #2b00fe;"> </span></div><div style="font-size: 14.6667px;"><br /></div><div style="font-size: 14.6667px;"><b>2. <span style="color: #2b00fe;">Type “Image to pdf Converter” and press Enter.</span></b></div><div style="font-size: 14.6667px;"><b><br /></b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-l2heDVxUDio/YNA1a54WFCI/AAAAAAAAWsc/7-U5hMe2gCMpaa4zn8rAz55Jgi4ORt2ZQCLcBGAsYHQ/s635/image%2Bto%2Bpdf%2Bconverter.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="222" data-original-width="635" src="https://1.bp.blogspot.com/-l2heDVxUDio/YNA1a54WFCI/AAAAAAAAWsc/7-U5hMe2gCMpaa4zn8rAz55Jgi4ORt2ZQCLcBGAsYHQ/s16000/image%2Bto%2Bpdf%2Bconverter.JPG" /></a></div><div style="font-size: 14.6667px;"><br /></div><div style="font-size: 14.6667px;"><b>3. <span style="color: #2b00fe;">Now you can see there is a lot of websites which is converting image to pdf. But my favorite is ilovepdf.com. Open the link in the new tab.</span></b></div><div style="font-size: 14.6667px;"><b><span style="color: #2b00fe;"><br /></span></b></div><div><span style="font-size: 14.6667px;"><b><span style="color: red;"><a href="https://www.ilovepdf.com/pdf_to_jpg">https://www.ilovepdf.com/pdf_to_jpg</a></span></b></span></div><div style="font-size: 14.6667px;"><b><br /></b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-rzLHRgfVwMc/YNA4MQFotAI/AAAAAAAAWtE/8AkPBLigiX8pXFXfVWqL10vYOUasFkFHQCLcBGAsYHQ/s723/open%2Bwebsite.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="513" data-original-width="723" src="https://1.bp.blogspot.com/-rzLHRgfVwMc/YNA4MQFotAI/AAAAAAAAWtE/8AkPBLigiX8pXFXfVWqL10vYOUasFkFHQCLcBGAsYHQ/s16000/open%2Bwebsite.JPG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="font-size: 14.6667px;"><br /></div><div style="font-size: 14.6667px;"><b>4. <span style="color: #2b00fe;">Now drag the image or open the image which you want to convert into pdf.</span></b><span style="color: #2b00fe;"> </span></div><div style="font-size: 14.6667px;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-S9_1d3AS-5I/YNA1_Qa7UdI/AAAAAAAAWss/2_-fWfMdaWAK0283S80xUyi85z0jVvuFQCLcBGAsYHQ/s825/select%2Bimage.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="825" src="https://1.bp.blogspot.com/-S9_1d3AS-5I/YNA1_Qa7UdI/AAAAAAAAWss/2_-fWfMdaWAK0283S80xUyi85z0jVvuFQCLcBGAsYHQ/s16000/select%2Bimage.JPG" /></a></div><br /><div style="font-size: 14.6667px;"><br /></div><div style="font-size: 14.6667px;"><b>5. <span style="color: #2b00fe;">Choose the pdf style (Portrait or landscape). And Also the Margin of the pdf. </span></b></div><div style="font-size: 14.6667px;"><b><br /></b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-8fKxQpi_I_M/YNA17J6YW1I/AAAAAAAAWso/ztOzztIE6Bk7KNmIp_uno9Mt3TzAPDWcgCLcBGAsYHQ/s1067/select%2Bmargin.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="554" data-original-width="1067" src="https://1.bp.blogspot.com/-8fKxQpi_I_M/YNA17J6YW1I/AAAAAAAAWso/ztOzztIE6Bk7KNmIp_uno9Mt3TzAPDWcgCLcBGAsYHQ/s16000/select%2Bmargin.JPG" /></a></div><br /><div style="font-size: 14.6667px;"><br /></div><div style="font-size: 14.6667px;"><b>6. <span style="color: #2b00fe;">After it clicks on the Convert to pdf option</span></b></div><div style="font-size: 14.6667px;"><b><br /></b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ok6ZeUf__4w/YNA2FSPujDI/AAAAAAAAWs0/fIPOoTe_vRkQuF-wiy-PdwmVL5gUr5i5ACLcBGAsYHQ/s750/download.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="750" src="https://1.bp.blogspot.com/-ok6ZeUf__4w/YNA2FSPujDI/AAAAAAAAWs0/fIPOoTe_vRkQuF-wiy-PdwmVL5gUr5i5ACLcBGAsYHQ/s16000/download.JPG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><p style="clear: both;"><span style="font-family: helvetica; font-size: medium;">For me, the online method is the<b> easiest method</b>. You just need to drag the image and press the convert button and your pdf will ready to download. But when you stuck in a situation where you haven’t internet access in your laptop, pc, & mobile. You should go with the first method and make your pdf without the internet.</span></p><p style="clear: both;"><span style="font-family: helvetica; font-size: medium;"><br />These are the two methods to making an image to pdf. We have discussed these two methods <b>(Online & Offline)</b>. Hope you guys are understood well. </span></p><div><br /></div></div></span></span></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com2tag:blogger.com,1999:blog-5772613978371078598.post-74270363153269185042021-06-19T05:13:00.002-07:002021-06-19T06:28:54.588-07:00C Program to Convert the ASCII code to Character.<h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">C Program to Convert the ASCII code to Character.</span></h1> <div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><br /></div><div><div style="line-height: 19px;"><div><b><span style="color: #af00db;">#include</span><span style="color: #a31515;"><stdio.h></span></b></div><b><br /></b><div><b><span style="color: blue;">void</span> <span style="color: #795e26;">main</span>()</b></div><div><b>{</b></div><div><b><span style="color: blue;">int</span> a;</b></div><div><b><span style="color: blue;">char</span> ch;</b></div><div><b><span style="color: #795e26;">printf</span>(<span style="color: #a31515;">"Enter any ch ASCII Code="</span>);</b></div><div><b><span style="color: #795e26;">scanf</span>(<span style="color: #a31515;">"%d"</span>,&a);</b></div><div><b>ch=a;</b></div><div><b><span style="color: #795e26;">printf</span>(<span style="color: #a31515;">"Code is %d is %c"</span>,a,ch);</b></div><div><b><span style="color: #795e26;">getch</span>();</b></div><div><b>}</b></div></div><div><br /></div></div></div></div><p> Output:- </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-A6zAninnbWc/YM3fLXQHi0I/AAAAAAAAWpk/-pyOrU2FDDYE6xVYfvwAkwgXaSwyszwUACLcBGAsYHQ/s451/ex3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="203" data-original-width="451" src="https://1.bp.blogspot.com/-A6zAninnbWc/YM3fLXQHi0I/AAAAAAAAWpk/-pyOrU2FDDYE6xVYfvwAkwgXaSwyszwUACLcBGAsYHQ/s16000/ex3.JPG" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-5FOSJd0RIkc/YM3fLfelRYI/AAAAAAAAWps/c4UnKwtwXnUrXkO2FY0wnvam778iDI2lwCLcBGAsYHQ/s499/ex%2B2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="179" data-original-width="499" src="https://1.bp.blogspot.com/-5FOSJd0RIkc/YM3fLfelRYI/AAAAAAAAWps/c4UnKwtwXnUrXkO2FY0wnvam778iDI2lwCLcBGAsYHQ/s16000/ex%2B2.JPG" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-H7JkF56amdY/YM3fLW54vhI/AAAAAAAAWpo/uQt5lGw1nQoJm1CEpHwY13Zmrjsi_I-2ACLcBGAsYHQ/s413/ex%2B1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="172" data-original-width="413" src="https://1.bp.blogspot.com/-H7JkF56amdY/YM3fLW54vhI/AAAAAAAAWpo/uQt5lGw1nQoJm1CEpHwY13Zmrjsi_I-2ACLcBGAsYHQ/s16000/ex%2B1.JPG" /></a></div><br /><p><br /></p> Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-40525219818332743662021-06-17T00:53:00.001-07:002021-06-17T07:18:58.941-07:00CSS Tutorial : CSS Border Radius Property <div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-UDciwoqdhI4/YMr8EYj1JpI/AAAAAAAAWoA/5XlAqT0WG1AmhMv-c0capD9McDSxkiGUgCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-UDciwoqdhI4/YMr8EYj1JpI/AAAAAAAAWoA/5XlAqT0WG1AmhMv-c0capD9McDSxkiGUgCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></div><p>Hey Friends, in the last tutorial we had seen the CSS Border Property. There are 4 attributes in CSS border property. We have already discussed the first 3 attributes <b>(color, width, and style)</b>. If you haven’t read then read the <a href="/2021/06/css-tutorials-css-border-property.html" target="_blank"><b>previous one</b></a> first then read this tutorial. Now we are going to discuss the CSS Border Radius property. So let’s Begin….</p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">CSS Border Radius Property </span></h1><p>This CSS property is used to set the rounded corner of the Html elements. It defines the radius of the element. We can change all four corners of the box with different values. The Value of this property can be defined in percentage and length units. This CSS Property has four attributes. These are:- </p><p></p><ol style="text-align: left;"><li><b>Border-top-left-radius</b></li><li><b>Border-top-right-radius</b></li><li><b>Border-bottom-left-radius</b></li><li><b>Border-bottom-right-radius</b></li></ol><p></p><p>Let see an amazing example of it. </p><p><b>Example:- </b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><title></span> CSS Border Radius Property <span style="color: maroon;"></title></span></div><div> <span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">*</span>{</div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">30px</span>;</div><div> }</div><div> <span style="color: maroon;">body</span>{</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> }</div><div> <span style="color: maroon;">.box</span>{</div><div> <span style="color: red;">padding</span>: <span style="color: #098658;">23px</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">20%</span>;</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-radius</span>: <span style="color: #098658;">23%</span>;</div><div> }</div><div> <span style="color: maroon;">#box1</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">burlywood</span>;</div><div> }</div><div> <span style="color: maroon;">#box2</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">cornflowerblue</span>;</div><div> }</div><div> <span style="color: maroon;">#box3</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">darkgray</span>;</div><div> }</div><div> <span style="color: maroon;">#box4</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">darkorchid</span>;</div><div> }</div><div> </div><div> <span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box1"</span><span style="color: maroon;">></span> Box 1<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box2"</span><span style="color: maroon;">></span> Box 2<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box3"</span><span style="color: maroon;">></span> Box 3<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box4"</span><span style="color: maroon;">></span> Box 4<span style="color: maroon;"></p></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div><div> </div></div></div><p></p><p><b> Output:- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-AToODAvDxbM/YMrriKPy_NI/AAAAAAAAWnw/uhMTc7ZcGTUSWbmd1Qh6Y2g2leZaLK3xACLcBGAsYHQ/s1360/all%2Bcorner.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="428" data-original-width="1360" src="https://1.bp.blogspot.com/-AToODAvDxbM/YMrriKPy_NI/AAAAAAAAWnw/uhMTc7ZcGTUSWbmd1Qh6Y2g2leZaLK3xACLcBGAsYHQ/s16000/all%2Bcorner.JPG" /></a></div><p>In this example, you saw how all the corners of the box got rounded. If the user want to corner only the left side of the box. Then you have to select the border-top-left-radius attribute. Now the below example will show you to change all the box corner with different values. </p><p></p><p class="MsoNormal"><b>Example:-</b><o:p></o:p></p><p></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><title></span> CSS Border Radius Property <span style="color: maroon;"></title></span></div><div> <span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">*</span>{</div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">30px</span>;</div><div> }</div><div> <span style="color: maroon;">body</span>{</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> }</div><div> <span style="color: maroon;">.box</span>{</div><div> <span style="color: red;">padding</span>: <span style="color: #098658;">23px</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">20%</span>;</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> }</div><div> <span style="color: maroon;">#box1</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">burlywood</span>;</div><div> <span style="color: red;">border-top-left-radius</span>: <span style="color: #098658;">20px</span>;</div><div> <span style="color: red;">border-top-right-radius</span>: <span style="color: #098658;">30px</span>;</div><div> <span style="color: red;">border-bottom-left-radius</span>: <span style="color: #098658;">40px</span>;</div><div> <span style="color: red;">border-bottom-right-radius</span>: <span style="color: #098658;">50px</span>;</div><div> }</div><div> <span style="color: maroon;">#box2</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">cornflowerblue</span>;</div><div> <span style="color: red;">border-top-left-radius</span>: <span style="color: #098658;">5px</span>;</div><div> <span style="color: red;">border-top-right-radius</span>: <span style="color: #098658;">10px</span>;</div><div> <span style="color: red;">border-bottom-left-radius</span>: <span style="color: #098658;">15px</span>;</div><div> <span style="color: red;">border-bottom-right-radius</span>: <span style="color: #098658;">20px</span>;</div><div> }</div><div> <span style="color: maroon;">#box3</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">darkgray</span>;</div><div> <span style="color: red;">border-top-left-radius</span>: <span style="color: #098658;">56px</span>;</div><div> <span style="color: red;">border-top-right-radius</span>: <span style="color: #098658;">72px</span>;</div><div> <span style="color: red;">border-bottom-left-radius</span>: <span style="color: #098658;">33px</span>;</div><div> <span style="color: red;">border-bottom-right-radius</span>: <span style="color: #098658;">33px</span>;</div><div> }</div><div> <span style="color: maroon;">#box4</span>{</div><div> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">darkorchid</span>;</div><div> <span style="color: red;">border-top-left-radius</span>: <span style="color: #098658;">40px</span>;</div><div> <span style="color: red;">border-top-right-radius</span>: <span style="color: #098658;">35px</span>;</div><div> <span style="color: red;">border-bottom-left-radius</span>: <span style="color: #098658;">25px</span>;</div><div> <span style="color: red;">border-bottom-right-radius</span>: <span style="color: #098658;">15px</span>;</div><div> } </div><div> <span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box1"</span><span style="color: maroon;">></span> Box 1<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box2"</span><span style="color: maroon;">></span> Box 2<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box3"</span><span style="color: maroon;">></span> Box 3<span style="color: maroon;"></p></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"box"</span> <span style="color: red;">id</span>=<span style="color: blue;">"box4"</span><span style="color: maroon;">></span> Box 4<span style="color: maroon;"></p></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div><p></p><p> Output:- </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-9Sd3fKzw1hA/YMrslHT4ceI/AAAAAAAAWn4/hHIyQJZFyko_c-2AUYCzrHUv6iCMGm9wwCLcBGAsYHQ/s1360/different%2Bcorner.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="424" data-original-width="1360" src="https://1.bp.blogspot.com/-9Sd3fKzw1hA/YMrslHT4ceI/AAAAAAAAWn4/hHIyQJZFyko_c-2AUYCzrHUv6iCMGm9wwCLcBGAsYHQ/s16000/different%2Bcorner.JPG" /></a></div><p><br /></p><p><a href="/2021/06/css-tutorials-css-background-property_12.html" target="_blank"><b>People Also Read:- CSS Background Property</b></a></p><p><a href="/2021/05/css-tutorials-css-selector-different_21.html" target="_blank"><b>People Also Read:- CSS Selectors and Different types of Selectors</b></a></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-80017290143514879742021-06-16T06:08:00.001-07:002021-06-17T07:36:18.194-07:00CSS Tutorials : CSS Border Property <p><a href="https://1.bp.blogspot.com/-qaGNDhJsIOM/YMn3EJzu-MI/AAAAAAAAWmk/RS6fvTZC5jom7asOsfe3dLEdoZBzvffeACLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-qaGNDhJsIOM/YMn3EJzu-MI/AAAAAAAAWmk/RS6fvTZC5jom7asOsfe3dLEdoZBzvffeACLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a><br /></p><p class="MsoNormal">Hey Friends, in the last tutorial we have seen about the CSS background property. Now, this tutorial is based on CSS Border Property. So let’s begin...</p><p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="background-color: #fff2cc; color: red; font-size: x-large; line-height: 107%; mso-bidi-font-size: 11.0pt;">CSS Border Property</span></b></p> <p class="MsoNormal">The CSS border property is a property that is used to set the border of Html elements. This property is used to specify the color, style and the size of the border of an element. There are some border property shown below:- <o:p></o:p></p> <p class="MsoNormal"></p><ol style="text-align: left;"><li><b>Border-color</b></li><li><b>Border-style</b></li><li><b>Border-radius </b></li><li><b>Border-width</b></li></ol><o:p></o:p><p></p> <p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal">Now we are going to discuss these properties in detail. <o:p></o:p></p> <h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">1) Border Color CSS Property</span></h1><p>This border property is used to specify the color of the border. There are 3 methods to set the color of the border these are:- </p><p></p><ol style="text-align: left;"><li><span style="color: #a64d79;"><b>Name</b>:- It Specifies the<b> name</b> of the<b> color</b>. For Example:- “<b>Red</b>”, “<b>Yellow</b>” etc</span></li><li><span style="color: #a64d79;"><b>RGB </b>:- It Specifies the <b>RGB value</b> of the color. For Example :- <b>rgb(0,0,0,0)</b>, <b>rgb(1,8,6,2.5)</b> etc</span></li><li><span style="color: #a64d79;"><b>Hex </b>:- It Specifies the <b>hex decimal</b> value of the color. For Example :- <b>#ff000</b>, <b>#f2f2f2</b> etc</span></li></ol><p></p><p><b>Example:- </b></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> </div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">body</span>{</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> </div><div> }</div><div> <span style="color: maroon;">div</span>{</div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">10px</span>;</div><div> }</div><div> <span style="color: maroon;">#first</span> {</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-color</span>: <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">23%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> }</div><br /><div> <span style="color: maroon;">#second</span> {</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">0</span>, <span style="color: #098658;">0</span>,<span style="color: #098658;">0</span>);</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">23%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> }</div><br /><div> <span style="color: maroon;">#third</span>{</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-color</span>: <span style="color: #0451a5;">#7f23d4</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">23%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> }</div><div> <span style="color: maroon;"></style></span></div></div></div><p></p><p class="MsoNormal"><b>Output:- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-kf2CF6GUIpg/YMnv69h0QHI/AAAAAAAAWmM/dbMLIdAGjYMcFCJ4Zp16M9j0W563pgBcACLcBGAsYHQ/s1360/border%2Bcolor.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="397" data-original-width="1360" src="https://1.bp.blogspot.com/-kf2CF6GUIpg/YMnv69h0QHI/AAAAAAAAWmM/dbMLIdAGjYMcFCJ4Zp16M9j0W563pgBcACLcBGAsYHQ/s16000/border%2Bcolor.JPG" /></a></div><p></p><p class="MsoNormal"></p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red; font-size: x-large;"><span>2) Border Style CSS Property</span><span> </span></span></h1><div><span>This CSS Border Style Property is used to specify the border type which you want to display in your Html file. There is a lot of border-style value from where you can select the different types of border style to border an element. </span></div> <p class="MsoNormal" style="margin-left: 0.25in;"></p><ul style="text-align: left;"><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>None</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Dotted</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Dashed </b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Solid</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Double</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Groove</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Inset</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Outset</b></span></li><li><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Ridge</b></span></li></ul><p></p> <p class="MsoNormal"><span style="font-size: 12pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><b>Example:-</b></span></p><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><title></span> CSS Border Property <span style="color: maroon;"></title></span></div><div><span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">p.none</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">none</span>;} </div><div> <span style="color: maroon;">p.dotted</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">dotted</span>;} </div><div> <span style="color: maroon;">p.dashed</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">dashed</span>;} </div><div> <span style="color: maroon;">p.solid</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;} </div><div> <span style="color: maroon;">p.double</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">double</span>;} </div><div> <span style="color: maroon;">p.groove</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">groove</span>;} </div><div> <span style="color: maroon;">p.ridge</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">ridge</span>;} </div><div> <span style="color: maroon;">p.inset</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">inset</span>;} </div><div> <span style="color: maroon;">p.outset</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">outset</span>;} </div><div> <span style="color: maroon;">p.hidden</span> {<span style="color: red;">border-style</span>: <span style="color: #0451a5;">hidden</span>;}</div><div><span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"none"</span><span style="color: maroon;">></span>No border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"dotted"</span><span style="color: maroon;">></span>A dotted border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"dashed"</span><span style="color: maroon;">></span>A dashed border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"solid"</span><span style="color: maroon;">></span>A solid border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"double"</span><span style="color: maroon;">></span>A double border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"groove"</span><span style="color: maroon;">></span>A groove border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"ridge"</span><span style="color: maroon;">></span>A ridge border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"inset"</span><span style="color: maroon;">></span>An inset border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"outset"</span><span style="color: maroon;">></span>An outset border.<span style="color: maroon;"></p></span> </div><div> <span style="color: maroon;"><p</span> <span style="color: red;">class</span>=<span style="color: blue;">"hidden"</span><span style="color: maroon;">></span>A hidden border.<span style="color: maroon;"></p></span> </div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div><p class="MsoNormal"><b>Output:- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-WQysqXCl2g8/YMnx7Kz__rI/AAAAAAAAWmU/tEsuujLo7AEgsyHwgB0APwp87SEHa8ZhQCLcBGAsYHQ/s1360/border%2Bstyle.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="527" data-original-width="1360" src="https://1.bp.blogspot.com/-WQysqXCl2g8/YMnx7Kz__rI/AAAAAAAAWmU/tEsuujLo7AEgsyHwgB0APwp87SEHa8ZhQCLcBGAsYHQ/s16000/border%2Bstyle.JPG" /></a></div><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">3) Border Width CSS Property</span></h1><p class="MsoNormal">This property is used to set the width or the border. It is set in pixels. You can also select from pre-defined values like - <b>thin</b>, <b>thick</b>, and <b>medium</b>. </p><p class="MsoNormal"><b><span style="color: red;">Note: - This property is not worked alone means you have to use border-style property first then you can set the width of the border.</span></b></p> <p class="MsoNormal"><b>Example:- </b></p><div><div class="codeblock"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><html></span></div><div><span style="color: maroon;"><head></span></div><div> <span style="color: maroon;"><title></span> CSS Border Property <span style="color: maroon;"></title></span></div><div> <span style="color: maroon;"><style></span></div><div> <span style="color: maroon;">body</span>{</div><div> <span style="color: red;">display</span>: <span style="color: #0451a5;">flex</span>;</div><div> </div><div> }</div><div> <span style="color: maroon;">div</span>{</div><div> <span style="color: red;">margin</span>: <span style="color: #098658;">10px</span>;</div><div> }</div><div> <span style="color: maroon;">#first</span> {</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-color</span>: <span style="color: #0451a5;">red</span>;</div><div> <span style="color: red;">border-width</span>: <span style="color: #098658;">1px</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">23%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> }</div><br /><div> <span style="color: maroon;">#second</span> {</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-color</span>: <span style="color: #795e26;">rgb</span>(<span style="color: #098658;">0</span>, <span style="color: #098658;">0</span>,<span style="color: #098658;">0</span>);</div><div> <span style="color: red;">border-width</span>: <span style="color: #0451a5;">thick</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">23%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> }</div><br /><div> <span style="color: maroon;">#third</span>{</div><div> <span style="color: red;">border-style</span>: <span style="color: #0451a5;">solid</span>;</div><div> <span style="color: red;">border-color</span>: <span style="color: #0451a5;">#7f23d4</span>;</div><div> <span style="color: red;">border-width</span>: <span style="color: #098658;">10px</span>;</div><div> <span style="color: red;">width</span>: <span style="color: #098658;">23%</span>;</div><div> <span style="color: red;">height</span>: <span style="color: #098658;">20%</span>;</div><div> }</div><div> <span style="color: maroon;"></style></span></div><div><span style="color: maroon;"></head></span></div><br /><div><span style="color: maroon;"><body></span></div><div> <span style="color: maroon;"><div</span> <span style="color: red;">id</span>=<span style="color: blue;">"first"</span><span style="color: maroon;">></span></div><div> Lorem ipsum dolor sit, id, ab aspernatur officiis, hmagnam atque pariatur alias iure itaque facere placeat</div><div> nesciunt enim odit corporis? Provident.</div><div> <span style="color: maroon;"></div></span></div><div> <span style="color: maroon;"><br></span></div><div> <span style="color: maroon;"><br></span></div><div> <span style="color: maroon;"><div</span> <span style="color: red;">id</span>=<span style="color: blue;">"second"</span><span style="color: maroon;">></span></div><div> Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab pariatur modi amet deleniti, quisquam alias</div><div> accusantium ipsa veritatis! Voluptate delectus nihil veritatis facere autem voluptatum et!</div><div> <span style="color: maroon;"></div></span></div><div><span style="color: maroon;"><br><br></span></div><div> <span style="color: maroon;"><div</span> <span style="color: red;">id</span>=<span style="color: blue;">"third"</span><span style="color: maroon;">></span></div><div> Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta, qui. </div><div> <span style="color: maroon;"></div></span></div><div><span style="color: maroon;"></body></span></div><div><span style="color: maroon;"></html></span></div></div></div></div><p class="MsoNormal"><b>Output:-</b> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-L2oUVqsVUuY/YMnzoHpKLhI/AAAAAAAAWmc/t0oS28m2Yx8x3T21bvmiFFxAHDSzqJecwCLcBGAsYHQ/s1111/border%2Bwidth.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="390" data-original-width="1111" src="https://1.bp.blogspot.com/-L2oUVqsVUuY/YMnzoHpKLhI/AAAAAAAAWmc/t0oS28m2Yx8x3T21bvmiFFxAHDSzqJecwCLcBGAsYHQ/s16000/border%2Bwidth.JPG" /></a></div><p class="MsoNormal">So Friend that’s all for this tutorial as you can see I have told only three property border-style, border-color, & border-width the last property is border-radius. We will discuss it in the next tutorial because the content of this property is very large so I thought that I have to make a separate tutorial on this topic. </p><p class="MsoNormal"><b><a href="/2021/06/css-tutorials-css-background-property.html" target="_blank">People Also Read :- CSS Background Property </a></b></p><p class="MsoNormal"><a href="/2021/06/css-tutorials-how-to-add-css-in-html.html" target="_blank"><b>People Also Read :- How to Add CSS in HTML File.</b></a></p>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-29484781210344523732021-06-12T06:31:00.008-07:002021-06-12T06:38:11.622-07:00CSS Tutorials : CSS Background Property Part - 2<p class="MsoNormal"><b><span style="font-size: 16pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><span style="font-size: 16pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><a href="https://1.bp.blogspot.com/-xog2VUTB5vs/YMS15YZ7S6I/AAAAAAAAWhs/kf7gU2EpL1UYwEuHzq4_fhPQpHBJ8hauwCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet%2B2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-xog2VUTB5vs/YMS15YZ7S6I/AAAAAAAAWhs/kf7gU2EpL1UYwEuHzq4_fhPQpHBJ8hauwCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet%2B2.png" /></a></span></b></div><b><span style="font-size: 16pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><span style="background-color: #fff2cc; color: red;"><br /></span></span></b><p></p><p class="MsoNormal"><b><span style="font-size: 16pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><span style="background-color: #fff2cc; color: red;">3) CSS Background Repeat</span><o:p></o:p></span></b></p> <p class="MsoNormal">If your image is small then by default image is repeated horizontally and vertically. Sometimes the user does not want to repeat its <b><a href="/2021/06/css-tutorials-css-background-property_12.html" target="_blank">background image</a></b>. Then in this situation, you can set the no-repeat value in the background-repeat CSS property. </p><p class="MsoNormal">But if the user wanted to repeat it background image only horizontally not vertically then you have to use the repeat-x value in the background-repeat CSS property. And it also applies vertically you just need to change x and change it to y. x is used horizontally and y is used vertically. <o:p></o:p></p> <p class="MsoNormal"><b>Let us see through an example</b><o:p></o:p></p> <p class="MsoNormal"><b>Example:- </b><o:p></o:p></p> <p class="MsoNormal"><o:p></o:p></p><h2 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">For no-repeat CSS Value </span></h2><p></p><div class="codeblock"><div style="line-height: 14.25pt; margin-bottom: 0.0001pt; text-align: left;"><b><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><html><br /></span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><head><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><title></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> CSS Background Property </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></title><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p> <br /></o:p></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><style><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">body</span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">{<br /><o:p></o:p></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: red; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">background-image</span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: url(ex.jpg);<br /><o:p></o:p></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: red; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">background-repeat</span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: </span><span style="color: #0451a5; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">no-repeat</span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">;<br /><o:p></o:p></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> }<br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> }<br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></style><br /></span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></head><br /></span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><body><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><h1></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> CSS Background Color Property.</span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></h1><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><h2></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> This is 2nd Heading.</span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></h2><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><p></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> This is a Paragraph. </span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></p><br /></span><span style="color: maroon; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></html></span></b></div></div><br /><p></p><div><b>Output :- </b></div><div><b><br /></b></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-D3pp46z2ZrI/YMSpfuDoUhI/AAAAAAAAWhE/4z_gurfhOJYLMWlixPqqZZsMzZmeoRmoQCLcBGAsYHQ/s645/background%2Bimage.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="309" data-original-width="645" src="https://1.bp.blogspot.com/-D3pp46z2ZrI/YMSpfuDoUhI/AAAAAAAAWhE/4z_gurfhOJYLMWlixPqqZZsMzZmeoRmoQCLcBGAsYHQ/s16000/background%2Bimage.JPG" /></a></div><h2 style="text-align: left;"><u><span style="background-color: #fff2cc; color: red;">For Repeat </span></u></h2><p class="MsoNormal"><o:p></o:p></p> <p class="MsoNormal"><b>Example :-</b></p><div class="codeblock"><div style="line-height: 14.25pt; margin-bottom: 0.0001pt; text-align: left;"><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><html><br /></span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><head><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><title></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> CSS Background Property </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></title><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><style><br /></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #aa5507; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">body</span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> {<br /><o:p></o:p></span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #96dd3b; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">background-image</span><span style="color: black; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: </span><span style="color: #2b00fe; font-weight: bold;"><span style="font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">url</span><span style="font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">(</span><i><span style="font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">ex.jpg</span></i></span><span style="font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><span style="color: #2b00fe;">);</span><br /><o:p></o:p></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #96dd3b; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">background-repeat</span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">: </span><i style="font-weight: bold;"><span style="color: #2b00fe; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">repeat</span></i><span style="font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><span style="color: #2b00fe;">;</span><br /><span style="color: #f8f8f8;"><o:p></o:p></span></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> }<br /></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></style><br /></span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></head><br /></span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><body><br /></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><h1></span><span style="font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> CSS Background Color Property.</span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></h1><br /></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><h2></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">This is 2nd Heading.</span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></h2><br /></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><p></span><span style="font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><b> This is a Paragraph.</b></span><span style="color: #f8f8f8; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></p><br /></span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"></body><br /></span><span style="color: #ec0d1e; font-family: Consolas; font-size: 10.5pt; font-weight: bold;"></html></span></div></div> <p class="MsoNormal"><b>Output :- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-iImuMs_5o9U/YMSsSaWH3fI/AAAAAAAAWhM/09-TQ4tO0Cka7wTKwxu22gaiy9cUTor4QCLcBGAsYHQ/s1356/background%2Brepeat.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="599" data-original-width="1356" src="https://1.bp.blogspot.com/-iImuMs_5o9U/YMSsSaWH3fI/AAAAAAAAWhM/09-TQ4tO0Cka7wTKwxu22gaiy9cUTor4QCLcBGAsYHQ/s16000/background%2Brepeat.JPG" /></a></div><div><br /></div><h2 style="text-align: left;"><b><span style="background-color: #fff2cc; color: red;">4) Background Attachment</span></b></h2><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal">This Background CSS property is used when the user doesn’t want to scroll the background image. He just wanted to scroll only the content written on the Html document. You can either scroll the image of the background or fixed it in that position. </p><p class="MsoNormal"><b>Let’s us see through Example </b></p><p class="MsoNormal"><b>Example:- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: red;"> <style><br /> body {</span><br /> <span style="color: #674ea7;"> background-image: </span>url(ex.jpg);<br /> <span style="color: #674ea7;">background-repeat:</span> no-repeat;<br /> <span style="color: #351c75;">background-attachment:</span>fixed;<br /> <span style="color: red;"> }<br /> </style></span></b></div></div><p class="MsoNormal"><b>Output :- </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-4pM1jnrtOzE/YMSvxYWsjMI/AAAAAAAAWhU/JjTrOx6kMFEPSZDcEwVMbhfQHZWUfDzOQCLcBGAsYHQ/s1358/background%2Battachment.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="575" data-original-width="1358" src="https://1.bp.blogspot.com/-4pM1jnrtOzE/YMSvxYWsjMI/AAAAAAAAWhU/JjTrOx6kMFEPSZDcEwVMbhfQHZWUfDzOQCLcBGAsYHQ/s16000/background%2Battachment.JPG" /></a></div><br /><p class="MsoNormal"></p><p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-size: 18pt; line-height: 107%; mso-bidi-font-size: 11.0pt;"><span style="background-color: #fff2cc; color: red;">5) Background Position </span><o:p></o:p></span></b></p><p class="MsoNormal">This Background CSS Property is used to position the background image on the browser. You can place the background image anywhere in the browser you just need to write the background-position property. Let’s see it through an example.</p><p class="MsoNormal"><b>Example :- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: red;"><html><br /><head><br /> <title></span> CSS Background Property <span style="color: red;"></title></span><br /> <span style="color: red;"> <style><br /> body {</span><br /> <span style="color: #8e7cc3;"> background-image:</span> url(ex.jpg);<br /> <span style="color: #674ea7;"> background-repeat:</span> no-repeat;<br /> <span style="color: #674ea7;">background-attachment:</span>fixed;<br /> <span style="color: #674ea7;"> background-position: </span>center; <br /> <span style="color: red;"> }<br /> </style><br /></head><br /><body><br /> <h1></span> CSS Background Color Property.<span style="color: red;"></h1></span><br /> <span style="color: red;"><h2></span> This is 2nd Heading.<span style="color: red;"></h2></span><br /> <span style="color: red;"><p></span> This is a Paragraph. <span style="color: red;"></p></span><br /> <span style="color: red;"><P></span>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem deleniti rerum, nobis ipsum neque eveniet ullam et ab voluptate cum quod, dicta beatae sed rem? Nam distinctio quis obcaecati sit.<br /><span style="color: red;"></body><br /></html></span></b></div></div></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><b>Output:-</b> </div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-t-0g8vXzI4Q/YMSzq-3y_4I/AAAAAAAAWhk/eFIiYZxRpLUPbXYNVYr8rrbMyEHPs6iLwCLcBGAsYHQ/s1355/background%2Bposition.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="629" data-original-width="1355" src="https://1.bp.blogspot.com/-t-0g8vXzI4Q/YMSzq-3y_4I/AAAAAAAAWhk/eFIiYZxRpLUPbXYNVYr8rrbMyEHPs6iLwCLcBGAsYHQ/s16000/background%2Bposition.JPG" /></a></div><b><br /></b><div style="text-align: left;"><a href="/2020/06/how-to-increase-your-computer-speed.html" target="_blank"><b>People Also Read:- How to Increase Your Computer Speed?</b></a></div><div style="text-align: left;"><a href="10 Computer Tips and Tricks Everyone should know" target="_blank"><b>People Also Read:- 10 Computer Tips and Tricks Everyone should know</b></a></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-9914875680701602092021-06-07T06:42:00.007-07:002021-06-07T06:51:55.946-07:00CSS Tutorials :- CSS Background Property Part 1<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DwTzpjP5JB8/YL4eVO9wVWI/AAAAAAAAWY8/9gwK9b69mqQOf4xlGEswY95Yu_j5tyDJgCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-DwTzpjP5JB8/YL4eVO9wVWI/AAAAAAAAWY8/9gwK9b69mqQOf4xlGEswY95Yu_j5tyDJgCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></div><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">CSS Background – CSS Property </span></h1><p>CSS Background property is used to define the background effects on the Html elements. There are 5 types of CSS Property that you can use it on the elements these are:- </p><p></p><ol style="text-align: left;"><li><b>Background-Color</b></li><li><b>Background-image</b></li><li><b>Background-repeat</b></li><li><b>Background-position</b></li><li><b>Background-attachment</b></li></ol><p></p><h1 style="text-align: left;"><span style="background-color: #fff2cc; color: red;">CSS Background Color</span></h1><p>This CSS property set the background color of any Html element in which the background property is used. </p><p><b>Example:- </b></p><div class="codeblock"> <div class="separator" style="clear: both; text-align: left;"><div style="font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: maroon;"><b><html></b></span></div><div><span style="color: maroon;"><b><head></b></span></div><div><b> <span style="color: maroon;"><title></span> CSS Background Property <span style="color: maroon;"></title></span></b></div><div><b> <span style="color: maroon;"><style></span></b></div><div><b> <span style="color: maroon;">*</span> {</b></div><div><b> <span style="color: red;">color</span>: <span style="color: #0451a5;">red</span>;</b></div><div><b> }</b></div><b><br /></b><div><b> <span style="color: maroon;">h1</span> {</b></div><div><b> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">yellow</span>;</b></div><div><b> }</b></div><b><br /></b><div><b> <span style="color: maroon;">h2</span> {</b></div><div><b> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">green</span>;</b></div><div><b> }</b></div><b><br /></b><div><b> <span style="color: maroon;">p</span> {</b></div><div><b> <span style="color: red;">background-color</span>: <span style="color: #0451a5;">blue</span>;</b></div><div><b> }</b></div><div><b> <span style="color: maroon;"></style></span></b></div><div><span style="color: maroon;"><b></head></b></span></div><div><span style="color: maroon;"><b><body></b></span></div><div><b> <span style="color: maroon;"><h1></span> CSS Background Color Property.<span style="color: maroon;"></h1></span></b></div><div><b> <span style="color: maroon;"><h2></span> This is 2nd Heading.<span style="color: maroon;"></h2></span></b></div><div><b> <span style="color: maroon;"><p></span> This is a Paragraph. <span style="color: maroon;"></p></span></b></div><div><span style="color: maroon;"><b></html></b></span></div></div></div></div><div> <br /></div><div><b>Output :- </b></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-9_xATB-PQ7g/YL4TbRy35vI/AAAAAAAAWYU/1R4BDxMBCIMd-8wRiMJSciEsVhRfm1qvgCLcBGAsYHQ/s683/background%2Bcolor.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="261" data-original-width="683" src="https://1.bp.blogspot.com/-9_xATB-PQ7g/YL4TbRy35vI/AAAAAAAAWYU/1R4BDxMBCIMd-8wRiMJSciEsVhRfm1qvgCLcBGAsYHQ/s16000/background%2Bcolor.JPG" /></a></div><div><br /></div><h1 style="text-align: left;"><b><span style="background-color: #fff2cc; color: red;">CSS Background Image </span></b></h1><div>This CSS Background Property is used to set an image as a background. You can set any type of image as a background of a html document. Just you need to enter the url or that image into you html documents.</div><div><br /></div><div><b>Example:-</b></div><div><br /></div></div><div class="codeblock"><div><div style="color: #black; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #ec0d1e;"><b><html></b></span></div><div><span style="color: #ec0d1e;"><b><head></b></span></div><div><b> <span style="color: #ec0d1e;"><title></span> CSS Background Property <span style="color: #ec0d1e;"></title></span></b></div><div><b> <span style="color: #ec0d1e;"><style></span></b></div><div><b> <span style="color: #aa5507;">body</span> {</b></div><div><b> <span style="color: #96dd3b;">background-image</span>: <span style="color: #ffb454;">url</span>(<span style="color: #fb9a4b; font-style: italic;">ex.jpg</span>);</b></div><div><b> }</b></div><div><b> <span style="color: #ec0d1e;"></style></span></b></div><div><span style="color: #ec0d1e;"><b></head></b></span></div><div><span style="color: #ec0d1e;"><b><body></b></span></div><div><b> <span style="color: #ec0d1e;"><h1></span> CSS Background Color Property.<span style="color: #ec0d1e;"></h1></span></b></div><div><b> <span style="color: #ec0d1e;"><h2></span> This is 2nd Heading.<span style="color: #ec0d1e;"></h2></span></b></div><div><b> <span style="color: #ec0d1e;"><p></span> This is a Paragraph. <span style="color: #ec0d1e;"></p></span></b></div><div><span style="color: #ec0d1e;"><b></body></b></span></div><div><span style="color: #ec0d1e;"><b></html></b></span></div></div></div></div><div><b><br /></b></div><div><b>Output:-</b></div><div><b><br /></b></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ioUhKrihKpE/YL4YFTA_QkI/AAAAAAAAWYw/HpfQT859VIA7Hng1-UXwUvyivMuljFS1ACLcBGAsYHQ/s645/background%2Bimage.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="309" data-original-width="645" src="https://1.bp.blogspot.com/-ioUhKrihKpE/YL4YFTA_QkI/AAAAAAAAWYw/HpfQT859VIA7Hng1-UXwUvyivMuljFS1ACLcBGAsYHQ/s16000/background%2Bimage.JPG" /></a></div><br /><b><br /></b></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com2tag:blogger.com,1999:blog-5772613978371078598.post-29143970022610182112021-06-05T05:59:00.001-07:002021-06-05T05:59:39.740-07:00CSS-Tutorials :- How to Add CSS in HTML Documents.<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-x1c8RG3Rszg/YLtzy8lTPBI/AAAAAAAAWWk/qa4uVqdTMWIgs40JvC6jYnceXdKYsjLOACLcBGAsYHQ/s1280/Banner.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-x1c8RG3Rszg/YLtzy8lTPBI/AAAAAAAAWWk/qa4uVqdTMWIgs40JvC6jYnceXdKYsjLOACLcBGAsYHQ/s16000/Banner.png" /></a></div><p>Hey Friends in our last tutorial we have seen that how to select the Html element in CSS. And Different types of selectors available in CSS. Now in this tutorial, we are going to learn about how to insert CSS in our Html file. So let’s begin…</p><p><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">How to ADD CSS in HTML Document.</span></b></p><p>There are commonly three ways to add CSS in your Html document. These are:- </p><p></p><ul style="text-align: left;"><li><b>Inline CSS</b></li><li><b>Internal CSS</b></li><li><b>External CSS</b></li></ul><p></p><p><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">1) INLINE CSS</span></b></p><p>The first method to add css into html document was Inline CSS. In the Inline CSS, CSS Property will be written inside the html element. For Example:- </p><p>Ex :- <b><p style="color: red; background-color: yellow; "> This is a Paragraph.</p></b></p><p><b>Example :- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #a64d79;"><html><br /></span></b><b><span style="color: #a64d79;"><head><br /></span></b><b><span style="color: #a64d79;"> <title> Add CSS to html File </title><br /></span></b><b><span style="color: #a64d79;"></head><br /></span></b><b><span style="color: #a64d79;"><body><br /></span></b><b><span style="color: #a64d79;"> <p style="color: red; background-color: yellow; font-size: 30px;"> This is a Paragraph.</p><br /></span></b><b><span style="color: #a64d79;"></html></span></b></div></div><p><b>Output :- </b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Pz3kR6o3bsE/YLtsqRqWOBI/AAAAAAAAWWM/q75Nci1o1J4SING-7ynZm8f8GVZ4S0b2ACLcBGAsYHQ/s413/Ex.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="179" data-original-width="413" src="https://1.bp.blogspot.com/-Pz3kR6o3bsE/YLtsqRqWOBI/AAAAAAAAWWM/q75Nci1o1J4SING-7ynZm8f8GVZ4S0b2ACLcBGAsYHQ/s16000/Ex.JPG" /></a></div><p></p><p><span style="color: red;"><b><span style="background-color: #fff2cc; font-size: x-large;">2) Internal CSS</span></b> </span></p><p>This is the second method to add CSS into the Html documents. Internal CSS is used under the style tag. It affects all the Html elements of the page. For Example:- </p><p>Ex :- <b><style> p : { color : red; } </style></b></p><p><b><span style="color: red;">Important: The main difference between inline and internal CSS Was:-</span></b> </p><p></p><ul style="text-align: left;"><li><b>In Inline CSS, CSS Property is used only on the particular element in which CSS has written, it doesn’t affect other elements. </b></li><li><b>But in Internal CSS, CSS Property will apply in all the Html elements used in your Html document. Look at the example below. </b></li></ul><p></p><p><b>Example :- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #674ea7;"><html><br /></span></b><b><span style="color: #674ea7;"><head><br /></span></b><b><span style="color: #674ea7;"> <title> Add CSS to html File </title><br /></span></b><b><span style="color: #674ea7;"></head><br /></span></b><b><span style="color: #674ea7;"><style><br /></span></b><b><span style="color: #674ea7;"> p{<br /></span></b><b><span style="color: #674ea7;"> color: red;<br /></span></b><b><span style="color: #674ea7;"> font-size: 33px;<br /></span></b><b><span style="color: #674ea7;"> background-color: rgb(168, 214, 168);<br /></span></b><b><span style="color: #674ea7;"> }<br /></span></b><b><span style="color: #674ea7;"></style><br /></span></b><b><span style="color: #674ea7;"><body><br /></span></b><b><span style="color: #674ea7;"> <p> This is a Paragraph.</p><br /></span></b><b><span style="color: #674ea7;"> <p> This is the Second Paragraph. </p><br /></span></b><b><span style="color: #674ea7;"></html><br /></span></b></div></div><b>Output :-</b><div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-M7NCkExQkAU/YLtxqCDZDhI/AAAAAAAAWWU/hGRrQbyGMb03Hbm5aNBdxn7hNaNxJvSDwCLcBGAsYHQ/s517/Ex%2B2.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="235" data-original-width="517" src="https://1.bp.blogspot.com/-M7NCkExQkAU/YLtxqCDZDhI/AAAAAAAAWWU/hGRrQbyGMb03Hbm5aNBdxn7hNaNxJvSDwCLcBGAsYHQ/s16000/Ex%2B2.JPG" /></a></div><p><span style="font-size: x-large;"><b><span style="background-color: #fff2cc;"><span style="color: red;">3) External CSS</span></span> </b></span></p><p>This is the last method and for web developers, it is a very useful method comparing to the other methods. In this method, a new CSS file will be created and add to the Html documents. All the CSS property is written on this file. Let us see through an example</p><p><b>Example:- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #cc0000;"><!DOCTYPE html><br /></span></b><b><span style="color: #cc0000;"><html lang="en"><br /></span></b><b><span style="color: #cc0000;"><head><br /></span></b><b><span style="color: #cc0000;"> <title>Document</title><br /></span></b><b><span style="color: #cc0000;"> <link rel="stylesheet" href="style.css"> // Style.css is a File in which all the css code is written. <br /></span></b><b><span style="color: #cc0000;"></head><br /></span></b><b><span style="color: #cc0000;"><body><br /></span></b><b><span style="color: #cc0000;"> <h1> This is a Heading. </h1><br /></span></b><b><span style="color: #cc0000;"> <p> This is a Paragraph </p><br /></span></b><b><span style="color: #cc0000;"> <div><br /></span></b><b><span style="color: #cc0000;"> <p> This is a Paragraph Inside Div Container.</p><br /></span></b><b><span style="color: #cc0000;"> </div><br /></span></b><b><span style="color: #cc0000;"></body><br /></span></b><b><span style="color: #cc0000;"></html></span></b></div></div><div class="codeblock"><p><b><span style="color: #3d85c6; font-size: large;">CSS Code :- </span></b></p><div style="text-align: left;"><b><span style="color: #3d85c6;">p{<br /></span></b><b><span style="color: #3d85c6;"> background-color: yellow;<br /></span></b><b><span style="color: #3d85c6;"> color: red;<br /></span></b><b><span style="color: #3d85c6;"> font-size: 23px;<br /></span></b><b><span style="color: #3d85c6;">}<br /></span></b><b><span style="color: #3d85c6;">h1{<br /></span></b><b><span style="color: #3d85c6;"> font-size: 30px;<br /></span></b><b><span style="color: #3d85c6;"> color: green;<br /></span></b><b><span style="color: #3d85c6;"> background-color: greenyellow;<br /></span></b><b><span style="color: #3d85c6;">}</span></b></div></div><p><b>Output:-</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-j9BnSXeHUvQ/YLtxxxHXGPI/AAAAAAAAWWY/f8L_Hz9oAAISjI9BEQDMw_2ul488_84CQCLcBGAsYHQ/s643/External%2BCSS.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="280" data-original-width="643" src="https://1.bp.blogspot.com/-j9BnSXeHUvQ/YLtxxxHXGPI/AAAAAAAAWWY/f8L_Hz9oAAISjI9BEQDMw_2ul488_84CQCLcBGAsYHQ/s16000/External%2BCSS.JPG" /></a></div><p>You May Also Like :- </p><p></p><ul style="text-align: left;"><li><a href="/2021/04/css-tutorials-introduction-to-css.html" target="_blank"><b>Introduction to CSS </b></a></li><li><a href="/2021/05/css-tutorials-css-syntax-with-example.html" target="_blank"><b>CSS Syntax With Example</b></a></li><li><a href="/2021/05/css-tutorials-css-comments-with-example.html"><b>CSS Comments With Example</b></a></li><li><b><a href="/2021/05/css-tutorials-css-selector-different.html" target="_blank">CSS Selector & Different types of Selectors</a> </b></li></ul><div><br /></div></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-28746230248980898932021-06-02T21:44:00.000-07:002021-06-02T21:44:07.047-07:00C Program to Find that Given Year is a Leap Year Or Not. <p style="text-align: left;"><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://1.bp.blogspot.com/-behoAwhzaPA/YLhd7vTSMNI/AAAAAAAAWU4/39n_o1oeq1wEgIPYrx9hg5Oc3gKwy87FACLcBGAsYHQ/s1280/banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-behoAwhzaPA/YLhd7vTSMNI/AAAAAAAAWU4/39n_o1oeq1wEgIPYrx9hg5Oc3gKwy87FACLcBGAsYHQ/s16000/banner.jpg" /></a></b></div><p></p><p style="text-align: left;"><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">Program to Find that Given Input is a Leap Year Or Not.</span></b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #a64d79;">#include<stdio.h><br />void main ()<br />{<br />int y;<br />printf ("Enter Any Year ");<br />scanf("%d",&y);<br />if (y%4==0)<br /> if (y%100==0)<br /> if (y%400==0)<br /> printf("Leap Year");<br /> else<br /> printf("Not Leap year");<br /> else<br /> printf("Leap Year");<br />else<br />printf("Not Leap Year");<br />getch();<br />}</span></b></div></div><div><br /></div><div><b><u>Output:-</u></b> </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DnpUkwRjrjY/YLhZCX5O1BI/AAAAAAAAWUo/WnvLGUMxPQcRNHxkmOoIGPSaOxvsIGe6ACLcBGAsYHQ/s307/Example%2B1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="132" data-original-width="307" src="https://1.bp.blogspot.com/-DnpUkwRjrjY/YLhZCX5O1BI/AAAAAAAAWUo/WnvLGUMxPQcRNHxkmOoIGPSaOxvsIGe6ACLcBGAsYHQ/s16000/Example%2B1.JPG" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-s-1iAkkoWoI/YLhZCQVwbYI/AAAAAAAAWUs/IDSvK0Svl-kS2x_CL89fMXRQ4OB0xJkbgCLcBGAsYHQ/s279/Example%2B2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="119" data-original-width="279" src="https://1.bp.blogspot.com/-s-1iAkkoWoI/YLhZCQVwbYI/AAAAAAAAWUs/IDSvK0Svl-kS2x_CL89fMXRQ4OB0xJkbgCLcBGAsYHQ/s16000/Example%2B2.JPG" /></a></div><br /><div><br /></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-77044953505380120212021-05-21T00:13:00.000-07:002021-05-21T00:13:30.607-07:00CSS tutorials : CSS Selector & Different type of CSS Selectors Part 3<p><b><span style="color: red; font-size: x-large;"></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><span style="color: red; font-size: x-large;"><a href="https://1.bp.blogspot.com/-4VruIIMwhDI/YKdQPxEwgWI/AAAAAAAAWKg/Tno46-kHSEAGvzX1btiibKv2pZGA5nAKgCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-4VruIIMwhDI/YKdQPxEwgWI/AAAAAAAAWKg/Tno46-kHSEAGvzX1btiibKv2pZGA5nAKgCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></span></b></div><p></p><p><b><span style="color: red; font-size: x-large;"><u style="background-color: #fff2cc;">(4) CSS Group Selectors </u></span></b></p><p>In CSS, you can also give the same style in any Html element just need to write the style at once. You just need to select the all the Html element at once and give them style which you want. This type of selection is done by Group Selectors. In simple words, you can style many Html elements just to select them at once. You don’t need to write style for all Html elements. </p><p><b><span style="font-size: large;">Let Us See through an example:- </span></b></p><p>In this example, we will show you that how one style sheet will style on all the Html elements with the help of group selectors. </p><p><b>Example:- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #a64d79;"><html><br /></span></b><b><span style="color: #a64d79;"><head><br /></span></b><b><span style="color: #a64d79;"> <title> CSS Selectors </title><br /></span></b><b><span style="color: #a64d79;"></head><br /></span></b><b><span style="color: #a64d79;"><style><br /></span></b><b><span style="color: #a64d79;"> p, h1, h2, span {<br /></span></b><b><span style="color: #a64d79;"> font: 120px;<br /></span></b><b><span style="color: #a64d79;"> Color: red;<br /></span></b><b><span style="color: #a64d79;"> Background-color: Yellow;<br /></span></b><b><span style="color: #a64d79;"> border: 2px solid green;<br /></span></b><b><span style="color: #a64d79;"> }<br /></span></b><b><span style="color: #a64d79;"></style><br /></span></b><b><span style="color: #a64d79;"><body><br /></span></b><b><span style="color: #a64d79;"><h1> This is a 1st Heading. </h1><br /></span></b><b><span style="color: #a64d79;"><p> Lorem, ipsum dololoam hic minus ducimus? Deserunt commodi eaque sit expedita. </p><br /></span></b><b><span style="color: #a64d79;"><span> This is a Span.</span><br /></span></b><b><span style="color: #a64d79;"><h2>This is 2nd heading. </h2><br /></span></b><b><span style="color: #a64d79;"><p>Lorem ipsum dolor oloremque consequatur repellendus magni? Reprehenderit aut asperiores id?</p><br /></span></b><b><span style="color: #a64d79;"></html> </span></b></div></div><p><b>Output :- </b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-0-6sU9rZIbc/YKdOLj6V1GI/AAAAAAAAWKM/xwJHy2TgUcElX5hHqn_87np0olT3pji6QCLcBGAsYHQ/s806/example%2B1.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="322" data-original-width="806" src="https://1.bp.blogspot.com/-0-6sU9rZIbc/YKdOLj6V1GI/AAAAAAAAWKM/xwJHy2TgUcElX5hHqn_87np0olT3pji6QCLcBGAsYHQ/s16000/example%2B1.JPG" /></a></div><p></p><p>As you can see in the above example how all the Html elements group together and once CSS properties will apply to all of them. </p><p><b><u><span style="background-color: #fff2cc; color: red; font-size: x-large;">(5) CSS Universal Selectors</span></u></b> </p><p>CSS Universal Selectors is used when you want apply a particular CSS properties to all the html elements. </p><p><b>Let’s see through an example :- </b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #674ea7;"><html><br /></span></b><b><span style="color: #674ea7;"><head><br /></span></b><b><span style="color: #674ea7;"> <title> CSS Selectors </title><br /></span></b><b><span style="color: #674ea7;"></head><br /></span></b><b><span style="color: #674ea7;"><style><br /></span></b><b><span style="color: #674ea7;"> * {<br /></span></b><b><span style="color: #674ea7;"> background-color: rgb(207, 107, 107);<br /></span></b><b><span style="color: #674ea7;"> }<br /></span></b><b><span style="color: #674ea7;"></style><br /></span></b><b><span style="color: #674ea7;"><body><br /></span></b><b><span style="color: #674ea7;"><div> <p> This is a Paragraph inside Div Container.</p> </div><br /></span></b><b><span style="color: #674ea7;"><p> This is a Paragraph Outside the Div Container.</p><br /></span></b><b><span style="color: #674ea7;"><div> <span> This is a Span tag inside the Div Container. </span></div><br /></span></b><b><span style="color: #674ea7;"><div> <textarea> Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugit, esse? <br /></span></b><b><span style="color: #674ea7;"></textarea></div><br /></span></b><b><span style="color: #674ea7;"><div> Lorem ipsum dolor sit amet consectetur adipisicing elit. Error, debitis? Lorem ipsum <br /></span></b><b><span style="color: #674ea7;">dolor sit amet consectetur, adipisicing elit. Error recusandae dolore eius eum asperiores?</div><br /></span></b><b><span style="color: #674ea7;"></html> </span></b></div></div><p><b>Output :- </b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Bs4Fh39uzLk/YKdOaOAoCZI/AAAAAAAAWKQ/NfpGTlQsZqcwUktm5nbin2AhJu8NOZSLwCLcBGAsYHQ/s1132/Example%2B2.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="444" data-original-width="1132" src="https://1.bp.blogspot.com/-Bs4Fh39uzLk/YKdOaOAoCZI/AAAAAAAAWKQ/NfpGTlQsZqcwUktm5nbin2AhJu8NOZSLwCLcBGAsYHQ/s16000/Example%2B2.JPG" /></a></div><br /><p></p><p>In this example, we have applied the background-color CSS property to all the Html elements that why the background color of all the Html elements will change. But you can use a universal selector in many different ways. Let’s see through an amazing example. </p><p><b>Example: -</b></p><div class="codeblock"> <div style="text-align: left;"><b><span style="color: #3d85c6;"><html><br /></span></b><b><span style="color: #3d85c6;"><head><br /></span></b><b><span style="color: #3d85c6;"> <title> CSS Selectors </title><br /></span></b><b><span style="color: #3d85c6;"></head><br /></span></b><b><span style="color: #3d85c6;"><style><br /></span></b><b><span style="color: #3d85c6;"> div * {<br /></span></b><b><span style="color: #3d85c6;"> background-color: rgb(207, 107, 107);<br /></span></b><b><span style="color: #3d85c6;"> }<br /></span></b><b><span style="color: #3d85c6;"></style><br /></span></b><b><span style="color: #3d85c6;"><body><br /></span></b><b><span style="color: #3d85c6;"><div> <p> This is a Paragraph inside Div Container.</p> </div><br /></span></b><b><span style="color: #3d85c6;"><p> This is a Paragraph Outside the Div Container.</p><br /></span></b><b><span style="color: #3d85c6;"><div> <span> This is a Span tag inside the Div Container. </span></div><br /></span></b><b><span style="color: #3d85c6;"><div> <textarea> Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugit, esse?</textarea></div><br /></span></b><b><span style="color: #3d85c6;"> <div> Lorem ipsum dolor sit amet consectetur adipisicing elit. Error, debitis? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Error recusandae dolore eius eum asperiores?</div><br /></span></b><b><span style="color: #3d85c6;"></html></span></b></div></div><p><b><u>Output :- </u></b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-YuJkKJlg20A/YKdOhvJli2I/AAAAAAAAWKY/lO_nsyOE6YwNoaiC2pA-bKli3jMyl-rUgCLcBGAsYHQ/s1137/Example%2B3.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="357" data-original-width="1137" src="https://1.bp.blogspot.com/-YuJkKJlg20A/YKdOhvJli2I/AAAAAAAAWKY/lO_nsyOE6YwNoaiC2pA-bKli3jMyl-rUgCLcBGAsYHQ/s16000/Example%2B3.JPG" /></a></div><p></p><p>In the above example, we saw that how we used the universal selector for the elements which is inside the div containers. The CSS property only applies to the elements which are inside the div containers. It doesn’t affect the other elements which are outside the div container.</p><p>Hope you all understand. If you still have any problem regard this, then tell us by commenting below, we will definitely try to solve the problem. </p><div><br /></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com2tag:blogger.com,1999:blog-5772613978371078598.post-85724191098839780332021-05-20T07:53:00.000-07:002021-05-20T07:53:52.351-07:00CSS tutorials : CSS Selector & Different type of CSS Selectors Part 2<div><b><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-2AHUHMF3SNw/YKYJOksklkI/AAAAAAAAWJA/yK6sf6W1Lh0IzxBXrBcCH-HMeEiMAqSkwCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-2AHUHMF3SNw/YKYJOksklkI/AAAAAAAAWJA/yK6sf6W1Lh0IzxBXrBcCH-HMeEiMAqSkwCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></div><br /><span style="background-color: #fff2cc; color: red; font-size: x-large;"><br /></span></b></div><div><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">CSS Selectors Part 2</span></b></div><div><br /></div><div>Hey Friend, in our last tutorials we have seen about CSS selectors and different types of CSS selectors. There are 5 types of CSS Selectors are present in CSS. I have already told the first 2 selectors in our last tutorials. So you do not read it then read the last tutorial first then read this.</div><div><br /></div><div><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">CSS Class Selector</span></b></div><div><br /></div><div>This types of selector select the Html elements by their class name. You can select any class name by using <b>“.”</b> And style him. Let us see through an example </div><div><br /></div><div><b><span style="color: red;">Important:- A Class Name should not be started from numerical value. </span></b></div><div><br /></div><div><b>Example:- </b></div><div><br /></div><div class="codeblock"> <div><b><span style="color: #674ea7;"><html></span></b></div><div><b><span style="color: #674ea7;"><head></span></b></div><div><b><span style="color: #674ea7;"> <title> CSS Class Selector </title></span></b></div><div><b><span style="color: #674ea7;"></head></span></b></div><div><b><span style="color: #674ea7;"><style></span></b></div><div><b><span style="color: #674ea7;">.marquee{</span></b></div><div><b><span style="color: #674ea7;"> font-size: 30px;</span></b></div><div><b><span style="color: #674ea7;"> color: red;</span></b></div><div><b><span style="color: #674ea7;"> background-color: yellow;</span></b></div><div><b><span style="color: #674ea7;">}</span></b></div><div><b><span style="color: #674ea7;">.heading1{</span></b></div><div><b><span style="color: #674ea7;"> color: Green;</span></b></div><div><b><span style="color: #674ea7;">}</span></b></div><div><b><span style="color: #674ea7;">.paragraph{</span></b></div><div><b><span style="color: #674ea7;"> background-color: tomato;</span></b></div><div><b><span style="color: #674ea7;"> border: 2px solid green;</span></b></div><div><b><span style="color: #674ea7;">}</span></b></div><div><b><span style="color: #674ea7;"></style></span></b></div><div><b><span style="color: #674ea7;"><marquee class = "marquee"> Example of Selectors </marquee></span></b></div><div><b><span style="color: #674ea7;"><h1 class = "heading1"></span></b></div><div><b><span style="color: #674ea7;"> This is a Heading. </span></b></div><div><b><span style="color: #674ea7;"></h1></span></b></div><div><b><span style="color: #674ea7;"><p class="paragraph"> This is a paragraph. </p></span></b></div><div><b><span style="color: #674ea7;"></html></span></b></div></div><div><br /></div><div><b>Output :- </b></div><div><b><br /></b></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-jKQLzgdXaVg/YKYGbYcRN2I/AAAAAAAAWIs/3CyevS_2pzMY7fF57wlGaf_7QQ2g6_k1gCLcBGAsYHQ/s641/example.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="282" data-original-width="641" src="https://1.bp.blogspot.com/-jKQLzgdXaVg/YKYGbYcRN2I/AAAAAAAAWIs/3CyevS_2pzMY7fF57wlGaf_7QQ2g6_k1gCLcBGAsYHQ/s16000/example.JPG" /></a></div></div><div><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">CSS Selector For Specific Elements</span></b></div><div><br /></div><div>This type of selector selects the specific Html element. For example, If there are a lot of Html elements with the same class name but you want to style only on paragraph tag. Then you need to use CSS selector-specific tool. if you want to style a specific Html element then you need to go through this selector. </div><div><br /></div><div><b>Example </b></div><div><br /></div><div class="codeblock"> <div><b><span style="color: #a64d79;"><html></span></b></div><div><b><span style="color: #a64d79;"><head></span></b></div><div><b><span style="color: #a64d79;"> <title> CSS Class Selector </title></span></b></div><div><b><span style="color: #a64d79;"></head></span></b></div><div><b><span style="color: #a64d79;"><style></span></b></div><div><b><span style="color: #a64d79;"> p.para {</span></b></div><div><b><span style="color: #a64d79;"> Color: red;</span></b></div><div><b><span style="color: #a64d79;"> Background-color: Yellow;</span></b></div><div><b><span style="color: #a64d79;"> }</span></b></div><div><b><span style="color: #a64d79;"></style></span></b></div><div><b><span style="color: #a64d79;"><body></span></b></div><div><b><span style="color: #a64d79;"> <h1 class="para"> This is 1st Heading. </h1></span></b></div><div><b><span style="color: #a64d79;"> <p class="para"> This is 1st Paragraph. </p></span></b></div><div><b><span style="color: #a64d79;"> <h2 class="para"> This is 2nd Heading. </h2></span></b></div><div><b><span style="color: #a64d79;"> <p class="para"> This is 2nd Paragraph. </p></span></b></div><div><b><span style="color: #a64d79;"></html></span></b></div></div><div><br /></div><div><b>Output :- </b></div><div><br /></div><div><span style="color: red; font-size: large;"><b>Before Appling CSS Class Specific Selectors</b></span></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ldyL6pZsO28/YKYGhV_kmeI/AAAAAAAAWIw/dfJdTX5TpwAIlcASr-NZdNY57z7JCuzrgCLcBGAsYHQ/s568/before.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="273" data-original-width="568" src="https://1.bp.blogspot.com/-ldyL6pZsO28/YKYGhV_kmeI/AAAAAAAAWIw/dfJdTX5TpwAIlcASr-NZdNY57z7JCuzrgCLcBGAsYHQ/s16000/before.JPG" /></a></div><div> </div><div><b><span style="color: red; font-size: large;">After Appling CSS Class Specific Selectors</span></b></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-e_h2Dhry8Pw/YKYGnl0OcSI/AAAAAAAAWI0/gZVTEpwTK8QdASdQy0Dyf5UEKb5ekhszwCLcBGAsYHQ/s592/After.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="592" src="https://1.bp.blogspot.com/-e_h2Dhry8Pw/YKYGnl0OcSI/AAAAAAAAWI0/gZVTEpwTK8QdASdQy0Dyf5UEKb5ekhszwCLcBGAsYHQ/s16000/After.JPG" /></a></div><div> </div><div>In this example, there are the same class names on the both heading and paragraph tag. But I want to style only paragraph tag. That’s why I use CSS class-specific selectors. First, select the specific Html element then the class name, and then the style which you want to style on that element. </div><div><br /></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com2tag:blogger.com,1999:blog-5772613978371078598.post-23177957254696160382021-05-07T22:36:00.000-07:002021-05-07T22:36:20.863-07:00CSS tutorials : CSS Selector & Different type of CSS Selectors Part 1<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-8_MM-jatmG4/YJYjMJ8IvSI/AAAAAAAAV84/eFntiEgBsBEbeehEOll_E0yeT6gyiIWHACLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-8_MM-jatmG4/YJYjMJ8IvSI/AAAAAAAAV84/eFntiEgBsBEbeehEOll_E0yeT6gyiIWHACLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></div><p>Hey Friends, in our last tutorials we have seen about CSS syntax. Now, in this tutorial, we are going to learn about CSS selectors. So let’s begin…</p><p><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">CSS Selectors</span></b></p><p>CSS Selectors are used to selecting the Html elements which you want to style. Selectors are select Html elements by their id, class, attributes, type, etc. </p><p><b>There are several different types of CSS selectors are:- </b></p><p></p><ul style="text-align: left;"><li><b>CSS Element Selector</b></li><li><b>CSS Id Selector</b></li><li><b>CSS Class Selector</b></li><li><b>CSS Universal Selector</b></li><li><b>CSS Group Selector</b></li></ul><p></p><p><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS Element Selector</b></span></p><p>In this type of CSS Selector the selector select by the name of html element. Let’s See the Example below.</p><p><b><span style="color: #2b00fe;">Example :- </span></b></p><div class="codeblock"><p><b><span style="color: #a64d79;"><html></span></b></p><p><b><span style="color: #a64d79;"><head></span></b></p><p><b><span style="color: #a64d79;"><title> CSS Elements Selector </title></span></b></p><p><b><span style="color: #a64d79;"></head></span></b></p><p><b><span style="color: #a64d79;"><style></span></b></p><p><b><span style="color: #a64d79;">h1 { </span></b></p><p><b><span style="color: #a64d79;">background-color: red;</span></b></p><p><b><span style="color: #a64d79;">color: Yellow; }</span></b></p><p><b><span style="color: #a64d79;">p { </span></b></p><p><b><span style="color: #a64d79;">background-color: Yellow;</span></b></p><p><b><span style="color: #a64d79;">color : Green; }</span></b></p><p><b><span style="color: #a64d79;"></style></span></b></p><p><b><span style="color: #a64d79;"><body></span></b></p><p><b><span style="color: #a64d79;"><h1> This is a Heading. </h1></span></b></p><p><b><span style="color: #a64d79;"><p> This is a Paragraph Tag. </p></span></b></p><p><b><span style="color: #a64d79;"></body></span></b></p><p><b><span style="color: #a64d79;"></html></span></b></p></div><p><b><span style="color: #2b00fe;">Output: -</span></b> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-RhIzwNVsVwQ/YJYcs7666bI/AAAAAAAAV8o/1lHzHHCOSaMp2uOT1kEfyNPToLMcddXNQCLcBGAsYHQ/s473/Element%2BSelector.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="205" data-original-width="473" src="https://1.bp.blogspot.com/-RhIzwNVsVwQ/YJYcs7666bI/AAAAAAAAV8o/1lHzHHCOSaMp2uOT1kEfyNPToLMcddXNQCLcBGAsYHQ/s16000/Element%2BSelector.JPG" /></a></div><p><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">CSS ID Selector</span></b></p><p>This type of CSS Selector selects the element by its id. It is good practice to give id or class name to each and every Html element. The main reason behind giving id and class name was you can select a particular element by its id or class name. </p><p><b><span style="color: #2b00fe;">Example: -</span></b></p><div class="codeblock"><p> <b><span style="color: #a64d79;"><html></span></b></p><p><b><span style="color: #a64d79;"><head></span></b></p><p><b><span style="color: #a64d79;"> <title> CSS ID Selector </title></span></b></p><p><b><span style="color: #a64d79;"></head></span></b></p><p><b><span style="color: #a64d79;"><style></span></b></p><p><b><span style="color: #a64d79;"> #heading {</span></b></p><p><b><span style="color: #a64d79;"> background-color: red;</span></b></p><p><b><span style="color: #a64d79;"> color: Yellow;</span></b></p><p><b><span style="color: #a64d79;"> }</span></b></p><p><b><span style="color: #a64d79;"> #heading2{</span></b></p><p><b><span style="color: #a64d79;"> background-color: black;</span></b></p><p><b><span style="color: #a64d79;"> color: white;</span></b></p><p><b><span style="color: #a64d79;"> }</span></b></p><p><b><span style="color: #a64d79;"><br /></span></b></p><p><b><span style="color: #a64d79;"> #para {</span></b></p><p><b><span style="color: #a64d79;"> background-color: Yellow;</span></b></p><p><b><span style="color: #a64d79;"> color: Green;</span></b></p><p><b><span style="color: #a64d79;"> }</span></b></p><p><b><span style="color: #a64d79;"></style></span></b></p><p><b><span style="color: #a64d79;"><body></span></b></p><p><b><span style="color: #a64d79;"> <h1 id="heading"> This is a Heading. </h1></span></b></p><p><b><span style="color: #a64d79;"> <h2 id = "heading2"> This is another heading</h2></span></b></p><p><b><span style="color: #a64d79;"> <p id="para"> This is a Paragraph Tag. </p></span></b></p><p><b><span style="color: #a64d79;"></body></span></b></p><p><b><span style="color: #a64d79;"></html></span></b></p></div><p><b><span style="color: red;">Note:- For Selecting the Html Element by its id. Always use "#" first, then the id name. </span></b></p><p><b><u><span style="color: #2b00fe;">Output: -</span></u></b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ujjod9rSps4/YJYd9CGdT-I/AAAAAAAAV8w/eE7eNHjOFpoq8mWvfndEFklChRQ7If99ACLcBGAsYHQ/s577/Id%2BSelector.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="263" data-original-width="577" src="https://1.bp.blogspot.com/-ujjod9rSps4/YJYd9CGdT-I/AAAAAAAAV8w/eE7eNHjOFpoq8mWvfndEFklChRQ7If99ACLcBGAsYHQ/s16000/Id%2BSelector.JPG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-15727237930754865842021-05-04T21:34:00.000-07:002021-05-04T21:34:06.076-07:00CSS Tutorials - CSS Comments with Example.<p><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://1.bp.blogspot.com/-Ezg0Q-IT66I/YJIfl4OZN7I/AAAAAAAAV6k/HS_i4O66OHkgl-adiqBgo6ls_7HP1pzhQCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-Ezg0Q-IT66I/YJIfl4OZN7I/AAAAAAAAV6k/HS_i4O66OHkgl-adiqBgo6ls_7HP1pzhQCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></b></div><p></p><p><b><span style="background-color: #fff2cc; color: red; font-size: x-large;"> CSS Comments</span></b></p><p>Comments are added to the source code to easily understand the code. It helps the other developer or programmer to understand the code (written by another developer) easily. Just like Html, comments are also written in CSS. </p><p><b><span style="background-color: #fff2cc; color: red; font-size: large;">There are two types of comments in CSS: -</span></b></p><p></p><ul style="text-align: left;"><li><b>Single Line Comments</b>: - These types of comments written only in one line. </li><li><b>Multi Line Comments</b>: - These types of comments are written in one or more lines.</li></ul><p></p><p><span style="color: red;"><b>Note :- Comments are ignored by the browser and would not be display as output. </b></span></p><p><b><u><span style="font-size: large;">Example of Comments</span></u></b></p><div class="codeblock"><div style="text-align: left;"><b><span style="color: #a64d79;"><html><br /><head><br /><title> Example of CSS Syntax </title><br /><style> <br />h1{ </span><span style="color: red;">/* This style is given to the heading tag only they didn't work on paragraph tag. */</span><br /><span style="color: #a64d79;">color: Red;</span><br /><span style="color: #a64d79;">background-color: Yellow;</span><br /><span style="color: #a64d79;">text-align: center;</span><br /><span style="color: #a64d79;">}</span><br /><span style="color: #a64d79;">p { </span><span style="color: #a64d79;"> </span></b><span><b><span style="color: #a64d79;"> </span></b> </span><span> <span style="color: red;"><b> </b></span></span><span style="color: red;"><b>/* This style is given to the <br /><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>paragraph tag only <br /><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>they didn't work on heading tag. <br /><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>*/</b></span><br /><b><span style="color: #a64d79;">color: Yellow;<br />background-color: green;<br />text-align: center;<br />}<br /></style><br /></head><br /><body><br /><h1> This is a Heading. </h1><br /><p> This is a Paragraph. </p><br /><div class="container"><br /> <p> This is a paragraph tag under the div. </p><br /></div><br /></body><br /></html></span></b></div></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><b><u>Output: -</u></b></div><div style="text-align: left;"><b><u><br /></u></b></div><div style="text-align: left;"><b><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-6T2cLtHsfRM/YJIeAiJq6eI/AAAAAAAAV6c/AYRtX4h6zYElQ98Hq5Tspuypwi5hEx3AACLcBGAsYHQ/s907/output.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="259" data-original-width="907" src="https://1.bp.blogspot.com/-6T2cLtHsfRM/YJIeAiJq6eI/AAAAAAAAV6c/AYRtX4h6zYElQ98Hq5Tspuypwi5hEx3AACLcBGAsYHQ/s16000/output.JPG" /></a></div><br /><u><br /></u></b></div><div style="text-align: left;"><br /></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1tag:blogger.com,1999:blog-5772613978371078598.post-41496342175886818652021-05-04T04:34:00.000-07:002021-05-04T04:34:55.026-07:00CSS Tutorials - CSS Syntax with Example <p><u><span style="color: red; font-size: x-large;"></span></u></p><div class="separator" style="clear: both; text-align: center;"><u><span style="color: red; font-size: x-large;"><a href="https://1.bp.blogspot.com/-Lus5iGd1ehw/YJEtMJnh54I/AAAAAAAAV5c/eLgoFE9CN3ks329z9DDcXLjga7n8H_uVgCLcBGAsYHQ/s1280/Cascading%2BStyle%2BSheet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" src="https://1.bp.blogspot.com/-Lus5iGd1ehw/YJEtMJnh54I/AAAAAAAAV5c/eLgoFE9CN3ks329z9DDcXLjga7n8H_uVgCLcBGAsYHQ/s16000/Cascading%2BStyle%2BSheet.png" /></a></span></u></div><p></p><p><u><span style="color: red; font-size: x-large;"><b style="background-color: #fff2cc;">CSS Syntax </b></span></u></p><p>A CSS style sheet consists of a set of instructions that is interpreted by the web browser and after interpreted by the web browser instructions are applied to the corresponding elements. Such as - paragraph, heading, div, etc. </p><p style="text-align: left;"><b><span style="background-color: #fff2cc; color: red; font-size: x-large;">The CSS Syntax Rule is made of three major parts:-</span></b></p><p></p><ul style="text-align: left;"><li><b>Selectors: -</b> A Selector is an html tag on which the CSS Style Sheet will be applied. Like :- <h1>, <p>, <span> etc.</li><li><b>Property: -</b> A property is a type of attribute of the Html elements. Such as Color, border, etc. </li><li><b>Value: -</b> Value is assigned on the CSS Property. Such as Color is the property and red is the value which is assigned to the color attribute. </li></ul><p></p><p><b><u><span style="background-color: #fff2cc; color: red; font-size: large;">Syntax of CSS</span></u></b></p><p><span style="font-size: large;"><b><u><br /></u></b></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-WrFPTLmdO3s/YJEk-7nQuVI/AAAAAAAAV48/dZEvqwQLntUBL-tGsVlHRzrrqibtL9INACLcBGAsYHQ/s499/syntax.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="98" data-original-width="499" src="https://1.bp.blogspot.com/-WrFPTLmdO3s/YJEk-7nQuVI/AAAAAAAAV48/dZEvqwQLntUBL-tGsVlHRzrrqibtL9INACLcBGAsYHQ/s16000/syntax.png" /></a></div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-v0xHA8Lyajw/YJEk-3eXJFI/AAAAAAAAV44/xzVxxTDtBHYIuXvvxslEffVmUSto4tY8wCLcBGAsYHQ/s599/syntax%2Bexample.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="202" data-original-width="599" src="https://1.bp.blogspot.com/-v0xHA8Lyajw/YJEk-3eXJFI/AAAAAAAAV44/xzVxxTDtBHYIuXvvxslEffVmUSto4tY8wCLcBGAsYHQ/s16000/syntax%2Bexample.png" /></a></div><b><u><span style="font-size: large;">Let us see through with a simple example.</span></u></b><div><span style="font-size: large;"><b><u><br /></u></b></span><div style="text-align: left;"><div class="codeblock"> <p><span style="color: #a64d79;"><b><html><br /><head><br /><title> Example of CSS Syntax </title><br /><style> <br />h1{<br />color: Red;<br />background-color: Yellow;<br />}<br />p{<br />color: Yellow;<br />background-color: green;<br />}<br /></style><br /></head><br /><body><br /><h1> This is a Heading. </h1><br /><p> This is a Paragraph. </p><br /></body><br /></html></b></span></p></div><div style="text-decoration-line: underline;"><b>Output: -</b></div><br /><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-rg66G-z-IIU/YJEoUIH1ELI/AAAAAAAAV5I/9KTXTg0HV-8Y4dKA0rCTmeTFipoA6DAwgCLcBGAsYHQ/s684/Example.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="269" data-original-width="684" src="https://1.bp.blogspot.com/-rg66G-z-IIU/YJEoUIH1ELI/AAAAAAAAV5I/9KTXTg0HV-8Y4dKA0rCTmeTFipoA6DAwgCLcBGAsYHQ/s16000/Example.JPG" /></a></div><b><span style="font-size: large;">You May Also Like:- </span></b></div><div><br /></div><div><b><a href="/2021/04/css-tutorials-introduction-to-css.html" target="_blank">CSS Tutorials - Introduction to CSS.</a></b></div><div><div><b><a href="/2020/07/html-id-full-explained.html" target="_blank">HTML ID :- Full Explained</a></b></div><div><b><a href="/2020/07/html-class-full-example-explained.html" target="_blank">HTML CLASS: Full Example Explained.</a></b></div><div><b><a href="/2020/07/html-block-and-inline-elements.html" target="_blank">HTML LIST:- Ordered List, Unordered List, Description List</a></b></div><div><b><a href="/2020/07/html-images-insert-image-in-html.html" target="_blank">HTML IMAGES :- INSERT AN IMAGE IN HTML DOCUMENT</a></b></div><div><b><a href="/2020/07/html-links-visited-unvisited-images-as.html" target="_blank">HTML LINKS : ( Visited, Unvisited, Images as a Link )</a></b></div></div><div><br /></div><div><br /></div>Suresh Mishrahttp://www.blogger.com/profile/12887133983978316333noreply@blogger.com1