Greetings. In my pursuit to learn HTML, I have a question about adding attributes to block level elements. Why is it that when you add style attributes to elements like:
<head style="background-color: rgb(0,255,255); font-family: cursive, fantasy sans-serif">
you include the font and bg color attribute within the style="" tag, but when you use...um...like:
<table height="40%" width="90%" border="5" style="font-size: 50%">
the height and width info is not to be included in the style tag? I mean, it's going to be hard to remember when to put what in the style tag, and what to leave outside and indicate seperately within the opening <table> tag. Can someone explain how I can figure out exactly what a style is, and when I should indicate an attribute using the style="" thingy?
<head style="background-color: rgb(0,255,255); font-family: cursive, fantasy sans-serif">
you include the font and bg color attribute within the style="" tag, but when you use...um...like:
<table height="40%" width="90%" border="5" style="font-size: 50%">
the height and width info is not to be included in the style tag? I mean, it's going to be hard to remember when to put what in the style tag, and what to leave outside and indicate seperately within the opening <table> tag. Can someone explain how I can figure out exactly what a style is, and when I should indicate an attribute using the style="" thingy?
Comment