Styling HTML with CSS
CSS is used to style HTML elements.
CSS was introduced together with HTML 4.
CSS can be added to HTML in the following ways:
- in separate style sheet files (CSS files)
- in the style element in the HTML head section
- in the style attribute in single HTML elements
Using the HTML Style Attribute
It is time consuming and not very practical to style HTML elements using the style attribute.
HTML Style Example - Background Color
The background-color property defines the background color for an element:
Try it Yourself
HTML Style Example - Font, Color and Size
HTML Style Example - Font, Color and Size
The font-family, color, and font-size properties defines the font, color, and size of the text
Try it Yourself
HTML Style Example - Text Alignment
Try it Yourself
HTML Style Example - Text Alignment
The text-align property specifies the horizontal alignment of text in an element:
Try it Yourself
0 comments:
¿Te animas a decir algo?