Next, within the body tag, we will use the class and element, that we styled through internal CSS.in our HTML code, we will include our styling definition within the style tag. For this example, we will use internal CSS i.e.Text- Color Demonstration Using Internal CSS Save the html file and open in a browser The results should look like:Ģ.We are testing colors through name and hex values along with using appropriate background colors We will code the page in such a way that both and cls1 are used.Please note that we will be using the CSS file which was created separately, so we will be calling for the sheet through the HTML page. Combing the two snippets, we will get the final CSS file: hex value (#000000 for Black), RGB value (rgb(220, 20, 60) for Crimson) and just the color names (cornflowerblue). ![]() As we can see, the code has all three types of values i.e.The idea is that this color scheme can be used by any element when required. Similar to the above code snippet, we will set the font color and background color for a class.We will define the background color along, to keep the visibility of the font color in sync with the background. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |