ad

Saturday, December 31, 2022

html student basic program web designing

            



         HTML FORM

html form is a section of a document which contains controls such as text ,Password fields,  checkboxes, radio buttons,submit tbuton, menus etc.


 Student information basic program

<!doctype html>
<html>
<head>
<title> student form html</title>
</head>
<body>
<h1>student basic information</h1>
<form>
<label for="firstname">First Name:</label><br>
<input type="text" id="firstname" name="firstname"><br>
<label for="lastname">last name:</label><br>
<input type="text" id="lastname" name="firstname"><br>
<label for ="address">Address:</label><br>
<textarea></textarea><br>
<label for="contact num">contact num:</label><br>
<input type="text" id="contact num" name="contact num"><br>
<label for="email">Email</label><br>
<input type="email" id="email" name="email"><br>
<label for="Password">password</label><br>
<input type="password" id="password" name="password"><br>
<label for="gender">Gender</label><br>
<input type="radio" id="gender" name="gender" value="male">Male<br>
<input type="radio" id="gender" name="gender" value="female">Female<br>
<input type="submit" value="submit">
</form>
</body>
</html>
</form>

Form output 

Tuesday, December 6, 2022

html background color

 


 CSS Framework 


Background color Example 

<!Doctype html>
<html> 
 <head>
<meta name="viewport" contente="width=device-width, initial scale=1">
<link rel="stylesheet"
 href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body>
 <div classe="W3-container">
<h1>Background Colors</h1>
<p>The w3-color classes use background colors for HTML elements </p>
</div>

<div class="W3-container w3-red">
<h3>red colour</h3>
<P>Since red is the color of blood, it has historically been associated with sacrifice, danger, <br>and courage. Modern surveys in Europe and the United States show red is also the color most commonly associated with heat, activity</p>
 </div>

<div class="W3-container w3-blue"> 
<h3>Blue </h3> 
<P>The color blue represents both the sky and the sea and is associated with<br> open spaces, freedom,</p>

 <div class="w3-container w3-pink">  <h3>pink </h3>
 <P>The color pink symbolizes joy and happiness. The third Sunday of the advent <br>is said to be pink-colored according to Christianity <p>
</div>

</body>

</html>

Background color output 


Background color


Text colour program CSS 

Example 


<!DOCTYPE html>

<html>

<body>

<div class="W-container">

<h1>Text Colors</h1>

<p>The w-text-color classes defines text colors for T elements.</p> 

</div>

<div class=w-container w-text-red">

<h2>INDIA</h2>

<p>India, also known as the Republic of India, is a country is South Asia It is the seventh largest<br> country by area and with more than 3 billion people, it is the second most pupulous country as well as the most populous <br>democracy in the world, 

</div>

 <div class="w-container w-text-purple">

<h3>Maharashtra</h3>

<p>  

In the Raigad area, Raigad is a hill fort that is around 25 kilometers from Mahad. In 1674 AD, Chhatrapati Shivaji made this fort his capital after renovating it. There is a rope-way provided at Raigad Fort that allows one to quickly ascend from the ground to the fort.

 </P>

</div>

</body>

</html>


Text colour program CSS 

output 


Text colour

 Related post 

html iframe

feedback form html & css with source code

html anchor tag

Friday, December 2, 2022

Horizontal navigation bar Web designing


 
Horizontal navigation bar

   The horizontal navigation bar is a most common type of  the navigation menu bar. It list the major page side-by-side and is placed in the website header.


Horizontal navigation bar Example 

<!DOCTYPE html>

<html>

<head><style>

ul{

list-style-type: none;

 margin: 0; padding: 0; 

overflow: hidden; 

background-color: #f09d28;}

li {

float: left; 

border-right:1px solid #bbb; } 

li:last-child { border-right: none;}

li a{ display: block; 

color: white; 

text-align: center;

padding: 14px 16px; text-decoration: none;

background-color:#f09d28;

 color: yellow;}

li a:hover:not(.active) { background-color: #111;}

.active {background-color: #2BE40; color:red;}

 </style>

<h1> College of computer </h1>

<li><a class="active" href="#home">Home</a></li>

 <li><a href="#About">About us</a></li>

 <li><a href="#courses">Courses</a></li>

<li style="float: right"><a href="download">download</a></li>

</ul></body>

</head></html>


Horizontal navigation bar Output


Horizontal navigation bar

Create CSS Navigation Bar 

Program


<!DOCTYPE HTML>

<html>

<head>

<title>Example shows </title>

<style>

body {

margin: 0px; }

ul{

list-style-type: none;

margin: 0px; padding: 0px;

width: 25%;

background-color:#f1f1f1;

position: fixed; height: 100%;

overflow: auto;

}

li a {

display: block;

color: #000;

padding: 8px 16px; text-decoration: none;

}

li a.active {

background-color: #f09d28; 

color:white; }

li a:hover:not(.active) {

background-color:#555; color:white;

}

</style>

</head>

<body>

<h2 style="text-align:center;"> Welcome ClassRoom </h2>

<ul>

<li><a class="active" href="#home">Home</a></li>

<li><a href="#about">About</a></li>

<li><a href="#meditation">Meditation</a></li>

<li><a href="#gallery">Gallery</a></li>

<li><a href="#contact">Contact</a></li>

</ul>

<div style="margin-left:25%; padding:1px 16px; height:1000px;">

 <h2>This is my Own Earth</h2>

<h4>The happiness of your life depends upon the quality of your thoughts: therefore, guard accordingly, and take care that you entertain no notions unsuitable to virtue and reasonable nature.<br></h4>

<p>I am not a Handsome guy, but I can give my hand-to-some one who needs help. <br></p>

</div>

</body>

</html>


Create CSS  Navigation Bar 

output 


Create Navigation Bar


Related post :-

inline css in html

html iframe

html id attribute

Wednesday, November 23, 2022

CSS Menu Design

 


    CSS Menu Design

Css menu design

Webpage menus play necessary part on the web. When designing menus, usability is the key. In this section we are going to show you how to create a simple, usable and functional horizontal menu with HTML and CSS step by step. We assume that you have a basic knowledge of HTML and CSS.

A navigation bar needs standard HTML as a base. In our examples we will build the navigation bar from a standard HTML list. A navigation bar is basically a list of links, so using the <ul> and <li> elements make perfect sense.


Create Navigation menu .

 Example 

<!DOCTYPE html>

<html>

<body>

<ul>

<li><a href="#home"> Home </li>

<li><a href="#About">About us</li> 

<li><a href="#courses">Courses</li>

 <li><a href ="#contacts">Contacts</li>

<li><a href="#downloads">Downloads</li>

</ul>

</body>

</html>


Create Navigation menu

 output 

Create Navigation menu

Create Navigation menu (margins, padding)

2. Example 

<!DOCTYPE html>

<html>

<head>

<style>

ul{

 list-style-type: none;

margin: 0px;

padding: 0px;

</style>

</head>

<body>

<h1>college of Computer science</h1>

<ul>

<li><a href="#home">Home </li>

<li><a href="#About">About us</li>

<li><a href="#courses">Courses</li>

<li><a href="#contact">Contact</li>

<li><a href="#downloads">Downloads</li>

</ul>

</body>

</html>

Create Navigation menu output 


Create Navigation menu

Vertical Navigation Bar


A vertical navigation bar is a collection of links on each page's left or right side. Merits of Vertical Navigation. A more considerable number of top-level linkages is possible.


Everything is apparent. While many of the pages on your website are hidden from view in drop-down menus in a horizontal menu, vertical menus let you list every page down the side of the page. Because of this, vertical menus are a fantastic alternative for lengthy, single-page websites and make navigating them easier.


Vertical Nevigation Bar Example

<!DOCTYPE html>

<html>

<head>

<style>

ul{

lilist-style-type: none;

margin: 0px; 

padding:0px;

}

li a{

display:block;

background-color: #f09d28;

 text-align: left;

text-decoration:none; 

width:100px;

padding: 8px 10px;

color:yellow; }

</style>

</head>

<body>

<h1>College of Computer science</h1>

<ul>

<li><a href="#home">Home</li>

<li><a href="#About">About us</li>

<li><a href="#courses">Courses</li> 

<li><a href="#downloads">Downloads</li>

<li><a href="#Contact">Content</li>

</ul></body> </html>


Vertical Nevigation Bar output 


Vertical Nevigation Bar


Create a basic vertical Nevigation Bar with a background color and Change the background color of the when links when the user moves the mouse over them.

For Example

<!DOCTYPE html>

 <html> 

<head>

 <style>

 ul(list-style-type: none;

margin: 0px;

 padding: 0px;

}

li a{

display:block;

background-color:#f09d28;

text-align:left;

text-decoration:none;

width:100px;

padding: 8px 10px;

color: yellow;

}

li a:hover

{

background-color:red; 

opacity:0.8;

 color:white; }

 </style>

</head>

 <body

<h1>College of Computer science</h1>

<h3> change the link color on hover </h3>

<ul>

 <li><a href="#home">Home</li>

<li><a href="#About">About us</li>

 <li><a href="#courses">Courses</li>

 <li><a href="#downloads">Downloads</li>

</ul> </body>

</html>

Output 
















Related post 

Tuesday, November 22, 2022

html Table Border

 

       Border Cells


Border


Border on empty cells

 In any table, A cell that does not contain any content is known as an empty cell. If you have empty cells in your table, then you can use the empty-cells property to specify whether or not their borders should be shown. Since browsers treat empty cells in different ways, if you want to explicitly show or hide borders on any empty cells then you should use this property.

Type 3 

1. ShowThis shows the border of any empty  cells.

2. hide: This hides the border of any empty cells

3. Inherit : if you have one table nested inside another 


Border on empty cells Example 

<html>

<head>

<style>

td { border: 1px solid #0088dd; 

padding:15px;}

table.one { empty-cells: show; } 

table.two { empty-cells: hide; }

</style>

 </head>

<body>

<h2> empty-cells: show property</h2> <table class="one">

<tr> <td>1</td><td>2</td> </tr> <tr> <td>3</td><td></td> </tr>

</table> <br> <h2> empty-cells:hide property</h2>

<table class="two"> <tr> <td>1</td><td>2</td> </tr>

 <tr><td>3</td><td></td> </tr>

 <table>  </body>

</html>


Border on empty cells output

Border on empty cells

Border-spacing & border-collapse

The border spacing property allows you to control the distance between adjacent cells. By defaul browsers often leave a small gap between each table cell, so if you want to increase or decrease this space then the border spacing property allows you to control the gap. The value of this property is usually specifted in pixels. You can specify two values if desired to specify separate numbers for horontal and vertical spacing.


Border-spacing property:


a)length:It specifies the horizontal and vertical spacing between borders. If two length values are provided to this property, the first value sets the horizontal spacing and the second value sets the vertical spacing.


b)inherit:-It specifies that the value of the border-spacing property should be inherited from the parent element.

 syntax 

border-spacing: 15px 50px;


In the above syntax, the border-spacing property takes two values, 15pixles and 50pixles. The first value specifies the horizontal spacing and the second value specifies the vertical spacing.


When a border has been used on table cells, where two cells meet, the width of lines would be twice that of the outside edges. It is possible to collapse adjacent borders to prevent this using the border- collapse property.


Possible values

Collapse: We use border-collapse property to create a collapsed border in HTML. The border-collapse is a CSS property used to set the table borders should collapse into a single border or be separated with its own border in HTML. it sets a common border to all the cells of a table.


Separate: The border-spacing CSS property sets the distance between the borders of adjacent cells in a <table> . This property applies only when border-collapse is separate. It sets the separate border for each cell of a table.

Inherit: it inherits the value of the border-collapse property from the parent element.

The inherit CSS keyword causes the element to take the computed value of the property from its parent element. It can be applied to any CSS property, including the CSS shorthand property. 


Syntax: 

 table {border-collapse: separate;

}

Border-spacing & border-collapse Example 

<html> <head>

<style>

td {

background-color: pink; 

padding: 15px; border: 2px solid #000000;

table.one { border-spacing: 5px 5px; } table.two { border-collapse: collapse; }

</Style>

</head>

<body>

<h2> border-spacing: 5px 5px;</h2>

 <table class="one">

<tr><td>1</td><td>2</td></tr> <tr><td>3</td><td>4</td></tr>

 </table>

<h2> border-collapse: collapse: </h2> 

<table class="two">

<tr><td>1</td><td>2</td></tr> <tr><td>3</td><td>4</td></tr>

 </table>

</body>

 </html>

Border-spacing & border-collapse output 


Border spacing and border collapse


Table Layout property

The table layout property is used to specify how a table should appear in a web browser. In CSS, the table-layout property allows flexibility in positioning the tables, which means that you can easily move and place tables at different locations throughout the Web page. Using the table-layout property also decreases the loading time of the table, allowing the main content to appear before the graphics. 


Auto: It refers to the layout in which a web browser automatically resizes a table according to its content. This is the default value of the table layout property.

Fixed: It refers to the layout in which a web browser reads only the first row of a table to determine the final layout of the table. It depends on the table width the width of the columns and border or cell spacing.


Syntax

Table {table-layout: auto;}

Table Layout property Example 

<!Doctype html>

<html><head>

<Style>

table { border-collapse: collapse;

 border:1px solid black;}

th, td {border-:1px solid black;}

table.a {table- layout: auto; width:180px;}

</Style></head><body>

 <h3>The table-layout & caption side Property</h3> 

<table class="a" id="example1">

<caption> Student Details</caption> <tr><th>Student ID</th>

<th>Student Name</th>

<th>Course</th></tr>

<tr><td>101</td>

<td>Amit</td>

<td>MCA</td></tr>

<tr><td>102</td>

<td>Sumit</td>

<td>BCA</td></tr>

</Body></html>

Table Layout property output 

Table Layout property

 Related post 

split a background into 2 color

how to apply image tag in html

html block and inline element


Monday, November 21, 2022

CSS Table property Web designing

     

      CSS Table property 

HTML table allow web development to arrange data into rows and columns. Styling a table with css can greatly improve it appearance.

CSS table  (basic tag information)


1.Width:  To set the width of the table

2. Padding:  To set the space  between the border of each table cell and it's content.

3. Text-transform:   To convert the content of the table headers to uppercase.

4. letter-spacing, font-size:   add additional styling to the contents of the table headers.

5. border-top, border-bottom:  set borders above and below the table headers.

6. text-align:  align the writing to the left of some table cells and to the right of the others.

7. background-color:  change the background color of the alternative table rows.

8. Hover:  highlight a table row when a user mouse goes over it.


CSS styling Table Tag 

1.Give cells padding:   if text in a table cell either touches a border ( or another cell) it becomes much harder to read. Adding padding helps to improve readability.

2. Distinguish heading:  putting all table headings in bold makes them easier to read.you can also make headings uppercase and then either add a background color or an underline to clearly distinguish them from content.

3. Shade alternate rows:  shading every other row can help users follow along the lines. use a subtle distinction from the normal color of the rows to keep the table looking clean.

4. Align numerals: You can use the text align property to align the content of any column that contains number to the right,so that large number are clearly distinguished from smaller ones.


Table Example

<!DOCKTYPE html>

<html>

<head>

 <style>

body { font-family: Arial, Verdana, sans-serif; color: #111333; 

}

table {

width: 600px; }


th, td {

padding: 7px 10px 10px 10px;}

th {

text-transform: uppercase; letter-spacing: 0.1em; font-size: 90%; border-bottom: 2px solid #111111; border-top: 1px solid #999; text-align: left;

}

 tr.even {background-color: #cccccc;}

tr.hover { background-color: #c3e6e5;}

 marks {text-align: right;}

 </style>

</head>

 <body>

 <h1>Topers of the Class in Subject wise</h1>

<table> 

 <th>Name</th>

 <th>Subject</th>

<th class="marks">Marks</th>

 <th class="marks">Position</th>

</tr>

<tr>

<td>Neeraj</td>

<td>Mathematics</td>

 <td class="marks">96</td>

<td class="marks">First</td>

</tr>

<tr class="even">

<td>poonam</td>

<td>Natural Science</td> 

<td class="marks">98</td>

 <td class="marks">First</td>

</tr> 

<tr>

<td>mone</td>

<td>History</td>

<td class="marks">97</td>

<td class="marks">First</td>

</tr>

<tr class="even">

<td>Amul</td> 

<td>Physics</td>

<td class="marks">96</td>

<td class="marks">First</td>

</tr>

</body></html>


Table output 


Table


2. Table border 

When you. build an HTML table without any border styles or attributes, browser display them without any border.To specify table border in css you can set the table border, head border, table description border etc.

Table background color: In css background color property is used to change the color of the table.The description border.

Table background color  Example

 <!DOCTYPE html>

 <html>

<head>

<style>

table, tr, th, td{

border: 3px solid blue;

border-left-color:red;

border-right-color:green;

border-right-style: dashed: 10 border-bottom-style:dotted; }

table { 12 width:40%;

text-align:left;

 background-color:yellow;  }

</style>

 </head>  <body>

<h1>Example of Table border with color</h1>  <table>

<tr><th>FirstName</th><th>LastName</th>

<th>Saving</th></tr>

  <tr><td>Amit</td><td>Tiwari</td><td>5000</td></tr>

<tr><td>Parichary</td><td>Tiwari</td><td>10000</td></tr> 

<tr><td>Ashish</td><td>Shukla</td><td>15000</td></tr>

 </table> </body>

</html>


Table background color output 

Table background color


3.Table Border-Radius-property

It is used to make the corners of the table borders as rounded.


Table Border-Radius- property Example

<!DOCTYPE html>

<html><head>

<style>

table, tr, th, td{

border: 3px solid blue; 

border-left-color:red;

border-right-color:green;

border-right-style:dashed;

border-bottom-style:dotted;

border-radius:50px; /* For change the table border*/ padding: 16px;

background-color:yellow;

width:40%; text-align:center;

</style>

</head> <body>

<h1>Example of Table border with color</h1>

<table>

<tr><th>FirstName</th><th>LastName</th><th>Saving</th></tr>

<tr><td>Amit</td><td>chavan</td><td>5000</td></tr>

<tr><td>Pratiksha</td><td>Tivari</td><td>10000</td></tr>

<tr><td>aradhy</td><td>mohite</td><td>15000</td></tr>

</table>

</body> </html>


Table Border-Radius property output

Table border radius

related Post :-

css menu design




Sunday, November 20, 2022

CSS position property Web designing

 


   CSS positioning property 


CSS position


The element's placement mechanism (static, fixed, relative, absolute, or sticky) is specified by the position attribute. The attributes of top, bottom, left, and right are used to position elements. but still until the position property set first, properties function. Additionally, their operations vary based on the value of the position.

Syntax:

 position: static | absolute | fixed | relative | sticky | initial | inherit; 

There are  important types of positioning method use for an element.


a. Static

b. Relative

c. absolute

d. fixed

e. Sticky

The position of top, bottom, right, and left are used to place elements h. But until the position property is set, the properties won't function. Additionally, it operates differently based on the position value. 


1 . position: static 

This is default value of position  it means that if the position value for an element is not set, then it will be static. The left, right, top, bottom properties have no effect in the position.


Static position Example 

<! Doctype html>

<html><head>

<style>

#box1 {

border-width: 10px;

border-style:ridged;

background-color: yellow;

height:100px; 

border: dotted;

#box2{

border:2px dashed red; 

padding: 50px;

background-color: gray;

height: 200px;

position: static;

}

</style>

</head>

<body>

<h1> Static positioned elements are positioned according to the normal flow of the web page.</h1>

<div id="box1">I am division 1, I am static positioned </div>

<div id="box2">I am division 2, I am also static positioned.</div>

</body></html>


Static position output

Static position


2. position:relative 

The element  positioned relative to  normal position in the webpage. The left, right,top,bottom properties are use then to set it location on the webpage. The gap (space) created due to  adjustment.


Position: relative Example 

<! Doctype html><html>

<head><style>

#box1{

border: 10px dotted blue;

 background-color:beige;

position: relative;

left: 60px; 

top:50px;

width:200px;

height:200px;

}

#box2{

border:2px dashed red;

background-color:azure;

position: relative;

left:300px;

bottom:150px;

width:200px;

height:200px;

padding-left:20px;

padding-top: 20px;

}

</style> </head>

<body>

<h1> Relative positioned elements are positioned relative to its normal position. </h1> 

<div id="box1"> I am box 1, I am relatively

positioned <br> (60px left and 50px top from my normal position).</div>

  <div id="box2"> I am box 2, I am relatively positioned <br>(i.e. 300px left and 150px bottom from my normal position. </div>

 </body>

</html>


Position:relative output 


Relative position

3. Position absolute 

The element will be positioned relative to closest positioned ancestor (parent). The left, right, top, bottom properties are use to set the location of the element relative to closest positioned ancestor. No space (gap) is created due to this adjustment (setting value of left, right, top, and bottom).

Position absolute Example 

<! Doctype html>

<html><head>

<style>

 #box1{

background-color: yellow;

position: relative;

left: 40px;

top: 20px;

width:500px; height:300px;

border: 10px dashed blue; }

img {

position: absolute;

height:200px;

width:200px;

right:10px;

bottom:10px;

border: 10px dotted red;

}

</style> </head>

<body>

 <h1> Absolute positioned element positioned <br>relative to its closest ancestor. </h1>

<div id="box1"> This is box 1, I am relatively positioned <br>(i.e. 40px 1- 50px top from my normal position.<br><br> This image is positioned absol i.e.10px from bottom, 10px from right to my (div) position because 1 ancestor of the image).

<img src="12.jpg"> </div>

</body></html>


Position : absolute output 


Position absolute


4. Position: Fixed

It is used to set element is fixed even if window scroll vertically or horizontally element is fixed place. No space (gap) is created due to this adjustment (setting value of left, right, top, and bottom).


Position Fixed Example

<!Doctype html>

<html> <head><style>

div{

background-color: yellow;

position: fixed;

height: 60px; width:400px;

right:10px; bottom: 10px;

border :10px dotted blue;

}

</style> </head>

<body> 

<br><br><br><br><br><br><br>

<h1>Example of CSS Position: FIXED </h1> <br><br><h1>See at bottom right corner of the screen. The fixed positioned div adjusted according to viewport of the screen (i.e. 10px right and 10px bottom from viewport of the screen.</h1>

<br>  <br>  <br>  <br><br> <br>  <br><br>  <br>  <br>  <br>  <br> <br><br><br><br><br><br><br>< br > <br>  <br>  <br>  <br>  <br>  <br>  <br>  <br><br><br><br><br><br><br><br> <div><h1>Please Scroll the web page. </h1> </div> <br>< br ><br><br> </body> </html>


Position Fixed output 


Position fixed

5.position: Sticky

 This position value works like as a mixture of relative and fixed. It behaves l relative position before the page scrolls and then sticks on the page based on the value of top, le might and bottom.


position: Sticky Example 

<html><head>

<style>

div {

background-color:yellow;

position: sticky:

height: 60px; width:400px:

left:0px;

top:0px;

border: 10px dotted blue;

</style></head>

<body>

<h1> Example of Sticky positioned elements</h1>

<h1>The below is sticky positioned div.</h1> <div><h1>Please Scroll the page</h1>
</div>

<br><br><br><br><br><br><br><br>

<br><br><br><br><br><br><br><br> <<br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br>

</body>

</html>


position: Sticky output 

Position Sticky 

Related post :-

css box property

css border bottom property

html inline element

Saturday, November 19, 2022

CSS Border bottom property Web designing blog

 


    Border bottom property


Border bottom property

1. Border-bottom-style

The Border bottom style property set a style of element bottom Border.

Syntax

 Rear: border-bottom-style: none hidden | dotted | dashed | solid | double groove ridge | inset | outset | initial | inherit;


Border-bottom-style Example 

<!DOCTYPE html>

 <html>

 <head>

 <style>

h1{border-bottom-style: groove; 

border-bottom-color: coral; 

 border-bottom-width: 7px;

}

div { border-style: solid; 

border-bottom-style: groove;

 border-bottom-color: coral; 

border-bottom-width: 7px; }

 </style>

</head>

 <body>

<h1>A heading with a groove bottom border</h1> 

 <div> div element with  groove bottom border.</div>

 </body>

 </html>

Border-bottom-style output 

Border-bottom-style

2. Border-bottom-color

The border-bottom-color property set the color of an element bottom border. Always declare to the border-style or the border-bottom-style property before the border- bottom-color property. An element must have a border before you can change the color.


Border-bottom-color Example 


<! Doctype html>

<html> 

 <head>

<style>

h1 {border-bottom-style: solid;

 border-bottom-color: pink;

h2 {

border-bottom-style: solid;

 border-bottom-color: rgb(20, 176,76);} 

h3 { border-bottom-style: solid;

 border-bottom-color: hsla(89, 45%, 10%,0.5);}

h4 {

border-style: solid;

 border-bottom-color: #92a8d1;} 

</style>

 </head> 

<body>

<h1>A head with a colored bottom border</h1>

<h2>A head with a colored bottom border</h2>

<h3>A head with a colored bottom border</h3>

 <h4>A head with a colored bottom border</h4> 

 </body>

</html>

Border-bottom-color output 


Border-bottom-color



3. border-top-right-radius Property: 


The border-top-right-radius property define the radius of  top-right corner. This property allow  add rounded borders to elements.


Syntax:

 border-top-right-radius: length | % [length | %] | Initial | inherit;

If you set two values  first one is for the top border, and the second one for the right border. If  second value is omitted it is copied from the first. If either length is zero corner is square, not rounded.


border-top-right-radius Example 


<IDOCTYPE html>
 <html>
<head>
<style>

 #border1{
border: 2px solid yellow;
 padding: 10px;
  border-top-right-radius: 25px;
}

#border2{
border: 2px solid red;
 padding: 10px;
 border-top-right-radius: 50px 20px;}

 #border3
 {

border: 2px solid red;
 padding: 10px; 
border-top-left-radius: 25px;
 border-top-right-radius: 25px; 
 border-bottom-left-radius: 25px; 
border-bottom-right-radius: 25px;}
 </style> </style></head> <body>

 <h2>border-top-right-radius: 25px: </h2> 
<div id="border1"> 
<p>The border-top-right-radius property defines  radius of  top-right corner. </p></div>

<h2>border-top-right-radius: 50px 20px:</h2> <div id="border2"> 
<p>If two values  set; the first one is for the top border, the second one for the right border,</p></div><br> 
 <div id="border3">third division </div>

 </body> </html>


border-top-right-radius Output



Border top right radius property


related post :-


html table border

html background color

create menu card

Thursday, November 17, 2022

Css Border bottom property



   

   CSS Border Properties

css Border property allows you to customize the borders around HTML elements. css border is a shorthand property to set individual border property values in a single place.  set a thickness or width, color and style of each border. The border-color specifies is the color of a border. border-style specifies  a border should solid-dashed line, double line, and one of the possible values. The border-width specifies  width a border.


 

There three border properties 

 

The border-style- 

Specifies whether  the border should solid, dashed line, double line, one of the other possible values. inset is a keyword to Border style and use to draw border around a box.

 

The border-color

Specifies the color of a border. The border-color property set the color of a element four borders. This property use  from one to four value. If the border-color property has four value border-color blue green red pink top border is blue.

 The border-width -

 Specifies the width of a border. 

 

border-style:

 none /* Defines no border */ | dotted  | inset | solid | dashed |  groove| double| outset | hidden |  ridge


1. Border style

 Example 

<!DOCTYPE html>

<html>

<head>

<style>

h1 {border: 5px solid red; }

 h2{ border: 5px double blue; }

h3{border: 5px dotted yellow; }

h4 {border: 5px dashed pink; }

h5 { border: 5px groove blue; }

h6 { border: 5px outset; }

 div { border-width:5px; border-style: inset;}

 p {border:5px ridge;} 

</style>

</head> 

<body>

solid double | dotted | dashed | groove | inset | outset | ridge

 <h1>Solid Border</h1>

 <h2>Double Border</h2>  

<h3>Dotted Border</h3>

 <h4>Dashed Border</h4>

 <h5>Groove Border</h5>

 <h6>Insert Border</h6>

<div>Inset Border</div>

<p> Ridge Border </p>

</body>

</html>

 

Border style values 

output 


Border style values


2. Border side of element 

Example 

<!DOCTYPE html>

<html>

<head> <style>

 p.a{border-style: dotted solid dashed double; }

 p.b{ border-style: dotted solid dashed;}

 p.c { border-style: dotted solid;}

 p.d {border-style: dotted ;}

  </style>

</head>

<p class="a"> http://webdesigningtheory.blogspot.com/</p> 

<p class="b"> http://webdesigningtheory.blogspot.com/</p> 

 <p class="c"> http://webdesigningtheory.blogspot.com/</p> 

 <p class="d"> http://webdesigningtheory.blogspot.com/</p>

</body> </html>

Border side of element 

 output 

 





3. Border bottom property 

Example 

<!DOCTYPE html>

 <html>

 <head>

<style>

 h1 { border-bottom: 5px solid pink;}

 h2 { border-bottom: 4px dotted blue;}

div { border-bottom: double;}

</style>

</head>

 <body>

 <h1>A head with a solid red bottom border</h1>

<h2>A head with a dotted blue bottom border</h2> 

 <div>A div elemente with a double bottom border.</div>

</body>

</html>


Border bottom property output 


Border bottom property

4. Border-bottom-width

border-bottom-width: - The border-bottom-width property set the width of element bottom border. Always declared border-style or border-bottom-style property before the border- bottom-width property. An element must have border before you  change the width.


Border bottom width 

Example

<!DOCTYPE html>

 <html>

<head>

<style>

h1 { border-bottom-style: solid; 

border-bottom-width: medium; }

 div { border-style: solid; 

border-bottom-width: thick;}

  p{ border-style: solid; border-bottom-width: 15px;}

</style>

</head>

 <body>

 <h1>A heading with medium bottom or border</h1>

 <div>div element is the medium bottom border.</div><br>

 <p>This is medium a bottom border using pixels</p>

 </body>

 </html>

Border-bottome-width

 output


Border-bottom-width



Related post 

lnline css in html

html iframe

html id attribute