For future reference, you might want to have a thorough look around:
http://www.w3.org/Style/CS
Particularly the section on learning CSS. What you asked is among the very first things you would learn in CSS, which does make me very suspicious that I have just done your homework without you learning anything...
Main Topics
Browse All Topics





by: kasandraPosted on 2003-04-30 at 01:03:13ID: 8426216
With how specific you requirement are, it sounds like a homework question!?! As a rule I don't normally answer homework questions, but I am making an assumption here, so:
Question 1:
<style type="text/css">
h1, h2, h3, h4, h5, h6 {
background: black;
color: white;
font-family: sans-serif;
}
</style>
Question 2:
By "strong tags in a heading" do you mean:
<h1><strong>This is a heading</strong></h1>
??
It's superfluous to do that, but you would write it thus:
h1 strong {
color: yellow;
font-weight: bold;
}
(likewise within the <style> tags - put it after the h1 - h6, and before the closing style tag)
If it is all h1 - h6, you would declare it in a similar fashion to the headings all being the same above, ie
h1 strong, h2 strong { color: yellow; font-weight: bold; }
etc