Html styles can be done within the element, head or a CSS file. There are many different style attributes so I will show a few of the most popular examples.
• background-color for background color
• color for text colors
• font-family for text fonts
• font-size for text sizes
• text-align for text alignment
Html styles can be done within the element, head or a CSS file. There are many different formatting options so I will show a few of the most popular examples.
• <b.> - Bold text
• <strong.> - Important text
• <i.> - Italic text
• <em.> - Emphasized text
• <mark.> - Marked text
• <small.> - Small text
• <del.> - Deleted text
• <ins.> - Inserted text
• <sub.> - Subscript text
• <sup.> - Superscript text
<.head> <.!--If you are using the style/format within the head-->
<.style>
Tagname{
property: value;
}
<./style>
<./head>
<.head> <.!--Example-->
<.style>
Tagname{
Background-color: blue;
}
<./style>
<./head>
Tagname { <.!--If you are using the style/format within the head-->
property: value;
}
.something {
property: value;
}
<.p class="something">
<.!-- Write your comments here -->
Comments are great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors.