CSS Properties: How to specify no border?
Solution:
HTML Code:
<!DOCTYPE html><!-- Declaration of HTML5 document type -->
<html>
<head>
<title>How to specify no border</title><!-- Title of the HTML document -->
<style type="text/css">/* CSS style start*/
h1.none {border-style: none;} /* Setting border style to "none" for elements with class "none" */
</style>
</head>
<body>
<h1 class="none">No border style</h1><!-- Heading with class "none" -->
</body>
</html>
Explanation:
- This HTML document demonstrates how to specify no border for an element using CSS.
- The CSS style block defines styling for elements with class "none".
- border-style: none; sets the border style to "none", effectively removing the border.
- The HTML content consists of a <h1> heading with class "none", demonstrating the absence of a border.
Live Demo:
See the Pen border-style-none-answer by w3resource (@w3resource) on CodePen.
See the solution in the browser
Supported browser
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/html-css-exercise/css-properties/border-style-none-answer.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics