HTML
- Introduction To HTML
- HTML Editors
- HTML Basic Examples
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Styles
- HTML Formatting Elements
- HTML Quotation
- HTML Comments
- HTML Colors
- HTML Styles - CSS
- HTML Links
- HTML Images
- HTML Tables
- HTML Lists
- HTML Block And Inline
- HTML Class
- HTML Id
- HTML Iframes
- HTML JavaScript
- HTML File Paths
- HTML Head
- HTML Layout
- HTML Responsive
- HTML Computer Code
- HTML Semantic
- HTML Forms
- HTML Form Attributes
- HTML Form Elements
- HTML Input Types
- HTML Input Attributes
- HTML Input Form Attributes
- HTML Canvas
- HTML SVG
- HTML Media
- HTML Video
- HTML Audio
- HTML YouTube
HTML Colors
Background Color
For HTML elements, you can choose the background colour by:
<h1 style="background-color:blue;">Hello Mytat</h1>
<p style="background-color:red;">Lorem ipsum...</p>
<p style="background-color:red;">Lorem ipsum...</p>
Text Color
You can modify the text's colour:
<h1 style="color:red;">Hello Mytat</h1>
<p style="color:blue;">Lorem ipsum...</p>
<p style="color:green;">This is paragraph content...</p>
<p style="color:blue;">Lorem ipsum...</p>
<p style="color:green;">This is paragraph content...</p>
Border Color
You can customise the border colour:
<h1 style="border:2px solid red;">Hello World</h1>
<h1 style="border:2px solid blue;">Hello World</h1>
<h1 style="border:2px solid orange;">Hello World</h1>
<h1 style="border:2px solid blue;">Hello World</h1>
<h1 style="border:2px solid orange;">Hello World</h1>
Color Values
Additionally, RGB, HEX, HSL, RGBA, and HSLA values can be used in HTML to specify colours.
The backgrounds of the following three <div>
elements are set with RGB, HEX, and HSL values:
<p>Same as color name "red":</p>
<h1 style="background-color:rgb(255, 99, 71);">rgb(255, 99, 71)</h1>
<h1 style="background-color:#ff6347;">#ff6347</h1>
<h1 style="background-color:hsl(9, 100%, 64%);">hsl(9, 100%, 64%)</h1>
<p>Same as color name "Tomato", but 50% transparent:</p>
<h1 style="background-color:rgba(255, 99, 71, 0.5);">rgba(255, 99, 71, 0.5)</h1>
<h1 style="background-color:hsla(9, 100%, 64%, 0.5);">hsla(9, 100%, 64%, 0.5)</h1>
<p>In addition to the predefined color names, colors can be specified using RGB, HEX, HSL, or even transparent colors using RGBA or HSLA color values.</p>
Products
Partner
Copyright © RVR Innovations LLP 2024 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP