</>
Skip to content
W3.CSS lessons (14/38)

W3.CSS — Panels

Basic Panel

<div class="w3-panel">
    <p>This is a basic panel with default styling.</p>
</div>

Panel with Background

<div class="w3-panel w3-blue">
    <p>Blue panel</p>
</div>

<div class="w3-panel w3-green">
    <p>Green panel</p>
</div>

<div class="w3-panel w3-red">
    <p>Red panel</p>
</div>

Panel with Border

<div class="w3-panel w3-border w3-round">
    <p>Panel with border</p>
</div>

<div class="w3-panel w3-leftbar w3-border-blue">
    <p>Panel with left border</p>
</div>

Note Panel

<div class="w3-panel w3-pale-blue w3-border w3-border-blue">
    <p><strong>Note:</strong> This is an important note.</p>
</div>

Tip Panel

<div class="w3-panel w3-pale-green w3-border w3-border-green">
    <p><strong>Tip:</strong> This is a helpful tip.</p>
</div>

Warning Panel

<div class="w3-panel w3-pale-yellow w3-border w3-border-yellow">
    <p><strong>Warning:</strong> Be careful with this!</p>
</div>

Danger Panel

<div class="w3-panel w3-pale-red w3-border w3-border-red">
    <p><strong>Danger:</strong> This could cause errors!</p>
</div>

Panel Examples

<!-- Info panel -->
<div class="w3-panel w3-leftbar w3-light-blue">
    <p><strong>Info:</strong> This is informational content.</p>
</div>

<!-- Custom panel -->
<div class="w3-panel w3-border w3-round-large w3-border-purple">
    <h4>Custom Panel</h4>
    <p>This panel has custom border and rounded corners.</p>
</div>

Panel Utilities

ClassDescription
w3-panelBasic panel
w3-panel w3-leftbarLeft border panel
w3-panel w3-rightbarRight border panel
w3-panel w3-topbarTop border panel
w3-panel w3-bottombarBottom border panel

Mini Practice

Create HTML code that:

  1. Creates a basic panel
  2. Adds a colored panel
  3. Creates a note panel
  4. Creates a warning panel

Up Next

Next: Learn about W3.CSS Tables.

Related Topics

Frequently Asked Questions about Panels

What is Panels in W3.CSS?

Panels is a fundamental concept in W3.CSS. This lesson explains it step by step with clear examples, making it easy for beginners to understand.

How do I learn Panels?

Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Panels.

Why is Panels important in W3.CSS?

Panels is essential for W3.CSS development. Understanding this concept will help you write better code and solve real-world problems more effectively.