Category: (X)HTML/CSS
Not only can you create links to other web pages, you can also add email links for people to click on. Adding an email address is a simple process of altering the href attribute within the <a> tag.
In the previous section about fonts, I went over the ways to change certain font properties. There is another group of CSS properties that can help you decorate, align and space out your text.
CSS provides two properties that allow designers to add whitespace around HTML elements. These properties are called 'margin' and 'padding'. Margin and padding in CSS is extra blank space around your content. Without margin or padding, all your content would get jumbled together.
You may be asking yourself, why do we need two properties to create this extra space around HTML elements? Simple! While both properties are strikingly similar, there is one key difference between them.
Prior to the usage of CSS , adding borders to your HTML elements was impossible except for creating borders around tables. With CSS, you can add tons of different borders to your web content. This page will go over a few of the most popular properties within 'border' segment.
Creating A Simple CSS Border
In order to create a border, we need to use the 'border-style' property. Below is a list of the border styles you can choose:
CSS can give you practically unlimited ways to change how your text is displayed. From changing the size to making it bold or underlined. You can also change what font the text is displayed to the user. Do you like Times New Roman or Verdana? While most of the examples so far have been manipulating text colors, size and format. This section will be more in depth about changing font properties.
body {background-image: url(picture.png);}
This will cause your browser to look for a file (in the same folder as your HTML document) named picture.png. This is a form of relative linking. Another example would be to add a sub folder before the actual picture: url(/images/picture.png) You can also use absolute linking to set an image:
body {background-image: url(http://www.newbtopro.com/images/picture.png);}
Regardless of what way you link to your picture, your image will show at the top left of the screen.
The basic syntax of a CSS rule is as follows:
selector {property: value;}The selector is simply the HTML tag you wish to style, the property is what you want to change and the value is the new setting. Curly brackets start and end the selectors rule for all properties.
There is also two key punctuation marks that are used within your CSS:
There are three methods of adding CSS to your HTML documents: external, internal and inline. This section will go through the pro's and con's of each of these.
External Method
The external method is used when you store all of your CSS in another file such as “external.css”. You would then create a link within your HTML document that says: “use the external.css file to style my document”. In order to link your CSS file to your web page, you will need to use the <link> tag:
Welcome to the world of Cascading Style Sheets (CSS). Without CSS, HTML documents can look boring to say the least. Put it another way, if HTML is a naked person than CSS is that person's clothing. Depending on the web designer's skill, those clothes could be anything from a cheap and ugly outfit to an Armani suit. Sure, you could “present” yourself in your birthday suit, but wouldn't you want to wear a fitted suit instead? CSS allows you to go from naked to noteworthy.
Creating HTML forms allows you to collect information from your visitors. Whether it's their name, email address or credit card number, you can use forms to take in information and do a variety of things with it. You can store this information in a file or a database, you can use a scripting language, such as PHP, to help validate the information the user submits or you can just email the information the visitor entered without actually saving the data.