|
![]() |
||
| |||
) will have the above style properties. Try it by typing the above in your mywebpage.html within the head tags. Save it and refresh your browser and see effect in your web page.
Let's see another example:
< style type="text/css"> p {
margin: 20px;
color: #cff;
background: #ccc;
text-align: right;
}
All of your content that you have placed within < p> and will have the above style properties. Now, type the above to your mywebpage.html within the head tags, save and refresh your browser and see the results.
Now, let's make our own selectors. As explained in creating CSS boxes, we can make an id and a class selectors and implement as follows:
< style type="text/css"> #ownidselector {
margin: 0px;
text-decoration: underline;
background: cff;
}
.ownclassselector {
margin: 10px;
font-size: 16px;
font-style: italic;
color: #f00;
}
.ownclassselector2 {
font-weight: bold;
font-family: courier;
border: 1px dashed #cff;
}
< body>
< div id="ownidselector">This is an example of using the id selector
Let's me explain to you the above style properties that are not discussed in Creating CSS Boxes:
text-decoration: underline - creates underline to the text or characters. You may use "none" instead of "underline" to remove the underline.
font-size: 16px - fixes the size of the font within the affected selector. You may use px, em, pt and % as unit of measure.
font-style: italic - makes the text or characters italic. You may also use normal, oblique.
color: #f00 - defines the color of the text or characters. You may use different web colors here. It is advisable to use web-safe colors as other computers or browsers could not display other colors.
font-weight: bold - makes the text or characters bold. You may use also normal, bolder, lighter, 100 up to 900.
font-family: courier - defines the font type of the text or characters. Common font types are arial, verdana and helvetica.
Type the above codes to your mywebpage.html within the style and body tags as noted, then save and refresh your browser to see the effects of the above style properties. You may change the values, then save and refresh to familiarize yourself with styling properties.
For complete web-safe color codes and complete list of style properties, click here
When you have already familiarized yourself with the html and CSS codes, it will be easy for you to create a web page.
I hope you've learned something in this tutorial. Just continue practicing and learning. Research, research, research. There so many free tutorials here on the web.
To learn more of HTML and CSS, search Google by typing "html tutorial" or "css tutorial" - Click Search and you will find many choices. For standards, you may visit www.W3C.org.
About the Author:
Hardi Budd is affiliated to Free website tips, guides, tutorials and web resources and http://free-website-tips-guides-tutorials.blogspot.com that offer Free website tips, guides, tutorials and web resources for affiliates, internet marketing, online business, search engine optimization, website promotion, internet security, emergency and survival, fraud and scam, chain letter and email hoaxes, health and safety, computer and technology and more. Supported with affiliate programs, freebie directory, add URL, link exchange, english tagalog jokes, news and more. This is free for republishing as long as the author byline with active link to our sites is retained as-is.
Print this article
Tell a friend
![]() | Related Articles |
Creating Your Own Web Page is Easy - A Tutorial (Part 1)
Creating Your Own Web Page is Easy - A Tutorial (Part 2)
Creating A Custom Button
The Basics of Creating an Internet Business Website
The 7 Key Elements Webmasters Don't Know About Creating an Outrageous Profitable Mini site
Creating a Search Engine Friendly Web Site
Creating a 'Sticky' Web Site
Topics to Add When Creating an Alternate and Modern Medicine Web Directory![]() | Post New Comment |