CSS box model in HTML with text.
Type of CSS Attributes.
1. border.
2. border-{
left, right, bottom, top} -color.
3. border-{
left, right, bottom, top} -style.
4. border-{
left, right, bottom, top} -width.
5. margin-top.
6. margin-left.
7. margin-bottom.
8. margin-right.
9. padding-top.
10. padding -left.
11. padding-bottom.
12. padding –right.
1)Write a CSS to set h1,h2 and h3 heading border display with red color.
HTML Code
- <html>
- <head>
- <style>
- body
- {
- width:500px;
- text-align: center;
- }
- h1
- {
- border-style: solid;
- border-color:red;
- }
- h2
- {
- border-style: solid;
- border-color:red;
- }
- h3
- {
- border-style: solid;
- border-color:red;
- }
- </style>
- </head>
- <body>
- <h1>IT-CE</h1>
- <h2>ME-MC</h2>
- <h3>CIVIL</h3>
- </body>
- </html>
Output:
2) Write a HTML and Internal CSS code to set paragraph text color is Blue and font should be times new roman.
HTML Code:
- <html>
- <head>
- <style>
- p
- {
- background-color:blue;
- color:white;
- font-style:italic;
- text-transform:lowercase;
- }
- </style>
- </head>
- <body>
- <p>
- 1) Bus Topology
- Bus topology is a simple networking topology. bus Topology is every Computer and network device is connected to Single cable. If one device is a failure then other devices do not effect.
- </br>
- All data Pass-through each of the connected devices.
- </br>
- Advantages
- </br>
- - easy to understand.
- - Multicasting And Broadcasting are much simpler.
- - Easy installation.
- - Less cable requires. cost of cable is less.
- </br>
- Disadvantages
- </br>
- - Less secure.
- - If network traffic is heavy then data transmission slow.
- - not work well under heavy traffic load.
- - less secure.
- </p>
- </body>
- </html>
Output:
3)Write an HTML and Internal CSS code to display three the Links (active red, visited-blue, unvisited-black) with background color yellow and without Underline Effect.
HTML Code:
- <html>
- <head>
- <style>
- a:unvisited
- {
- color:black;
- }
- a:visited
- {
- color:blue;
- }
- a:hover
- {
- color:lime ;
- }
- a:active
- {
- color:red;
- }
- </style>
- </head>
- <body>
- <a href="http://infodpsoft.blogspot.com">Infodpsoft</a><br/>
- <a href="https://infodpsoft.blogspot.com/2019/06/What-is-Topologies-And-Type-of-Topologies.html">What is Topology And Type of Topology - Networking | infodpsoft</a><br/>
- <a href="https://www.facebook.com/infodpsoft/">Infodpsoft Facebook</a>
- </body>
- </html>
Output:
Other Blog
No comments: