Core Code
Modern Dev Handbook
☰
HTML Contents
✕
HTML Guide
HTML Home
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Colors
HTML CSS
HTML Links
HTML Images
HTML Favicon
HTML Page Title
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Buttons
HTML Iframes
HTML JavaScript
HTML File Paths
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Style Guide
HTML Entities
HTML Symbols
HTML Emojis
HTML Charsets
HTML URL Encode
HTML vs. XHTML
Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
Graphics
HTML Canvas
HTML SVG
Media
HTML Media
HTML Video
HTML Audio
HTML Plug-ins
HTML YouTube
Web APIs
HTML Web APIs
HTML Geolocation
HTML Drag and Drop
HTML Web Storage
HTML Web Workers
HTML SSE
HTML
→
HTML Styles
Padding Style Example
Example using padding to create space inside an element.
Preview
Code
<div style="background:#eee;padding:20px;"> This box has padding inside it. </div>
More HTML Styles Examples (7)
Inline Text Color
Background Color Style
Font Size Style
Text Alignment
Border Style Example
Multiple CSS Properties
Styled Box Example
← Border Style Example
Multiple CSS Properties →