HTML Styles Flashcards
(30 cards)
is used to add styles to an element, such as color, font, size, and more.
HTML style attribute
Setting the style of an HTML element, can be done with
style attribute
Style Attribute Syntax
<tagname>
</tagname>
property defines the background color for an HTML element
background-color
property defines the text color for an HTML element.
color
property defines the font to be used for an HTML element
font-family
property defines the text size for an HTML element
font-size
property defines the horizontal text alignment for an HTML element
text-align
Use ______ for border size
border
border format
border: size border-type color
Defines a dotted border
dotted
Defines a dashed border
dashed
Defines a solid border
solid
Defines a double border
double
Defines a 3D grooved border. The effect depends on the border-color value
groove
Defines a 3D ridged border. The effect depends on the border-color value
ridge
Defines a 3D inset border. The effect depends on the border-color value
inset
Defines a 3D outset border. The effect depends on the border-color value
outset
Defines no border
none
Defines a hidden border
hidden
In HTML, colors can also be specified using 5 values
RGB values
HEX values
HSL values
RGBA values
HSLA values.
RGB value is defined as
rgb(255, 99, 71)
Hex value is defined as
ff6347
HSL value is defined as
hsl(9, 100%, 64%)