The :link pseudo-class is used to add special style to an unvisited link. Possible values could be any color name in any valid format. Example a:link { color:#000000; } Demo Link
CSS pseudo-classes are used to add special effects to some selectors. You do not need to use JavaScript or any other script to use those effects.The most commonly used pseudo-classes are −ValueDescription:linkUse this class to add special style to an unvisited link.:visitedUse this class to add special style to a visited link.:hoverUse this class to add special style to an element when you mouse over it.:activeUse this class to add special style to an active element.:focusUse this class to add special style to an element while the element has focus.:first-childUse this class to add special style to an element that ... Read More
The z-index property is used along with the position property to create an effect of layers. You can specify which element should come on top and which element should come at the bottom. ExampleYou can try to run the following code to implement the z-index property −
An element with position: absolute is positioned at the specified coordinates relative to your screen top-left corner.You can use two values top and left along with the position property to move an HTML element anywhere in the HTML document.Move Left - Use a negative value for left. Move Right - Use a positive value for left. Move Up - Use a negative value for top. Move Down - Use a positive value for top.ExampleYou can try to run the following code to implement absolute positioning − This div has absolute positioning.
Relative positioning changes the position of the HTML element relative to where it normally appears. So "left:20" adds 20 pixels to the element's LEFT position.You can use two values top and left along with the position property to move an HTML element anywhere in the HTML document. Move Left - Use a negative value for left. Move Right - Use a positive value for left. Move Up - Use a negative value for top. Move Down - Use a positive value for top.ExampleYou can try to run the following code to implement relative positioning − ... Read More
The visibility property with value visible is used to make an element visible. You can try to implement the following code to implement the visible property − Example p { visibility: hidden; } This paragraph is visible. This paragraph won't be visible.
Use the CSS overflow property to solve this issue of a content exceeding the allocated space. You can try to run the following code to solve the issue −Example .scroll{ display:block; border: 2px solid green; padding:10px; margin-top:10px; width:300px; height:50px; overflow:scroll; } .auto{ display:block; border: 2px solid green; ... Read More
The min-width property is used to set the minimum width that a box can be. The value of the min-width property can be a number, a length, or a percentage.Example This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px
JShell is an interactive tool that allows us to execute the java code and getting immediate results. We quickly evaluate expressions or short algorithms without compiling or build it. We can execute expressions, classes, methods, variables, and etc with the help of the JShell tool.Below are some of the keyboard shortcut keys:Entrance - Validate the lineLeft arrow - Move left in the lineRight arrow - Move right in the lineCtrl-A - Move to the start of the lineCtrl-E- Move to the end of the lineAlt-B - Move left, word by wordAlt-F - Move right, word by wordDelete - Delete characters after the cursorBackspace - Delete ... Read More
The margin-right specifies the right margin of an element. It can have a value in length, % or auto. You can try to run the following code to set the right margin −Example This is a paragraph with a specified right margin This is another paragraph with a specified right margin in percent