- Back to Home »
- HTML »
- HTML
Monday, 16 December 2013
Coding can be made effective with HTML, but designing with HTML is little difficult,since you will have to design only with your code.Alternative way of designing is to go with "CSS".(i.e) Cascading style sheet.
Using this we can design a web page more effective and attractive than the one made with HTML.
In this session,we can see about the basic inline and embedded styles and formatting with CSS.
Inline styles:
Using style sheet, we can code or design as follows:
<style>
h1{color:green}
</style>
To make a inline style,provide the attributes in a single tag.
<H1 style=textsize:14>
The above formatting is called inline style.An embedded style can be made by typing some property and values inside the heading tags
Sample code for embedded style:
<style>
H1
{
fontcolor:blue;
}
</style>
Fonts:
In HTML, we can specify a font type and size as follows:
<font face="arial,times new roman">ABC</font>
The same can be done with CSS as follows:
Font face:arial,Timesnew roman;
Sample web page using above concepts:
<html>
<head>
<title>New webpage</title>
<style>
H1
{
fontsize:14;
fontytype:arial,time new roman;
}
</style>
<body>
<font color="blue">The text is in blue</font>
</body>
</html>
Using this we can design a web page more effective and attractive than the one made with HTML.
In this session,we can see about the basic inline and embedded styles and formatting with CSS.
Inline styles:
Using style sheet, we can code or design as follows:
<style>
h1{color:green}
</style>
To make a inline style,provide the attributes in a single tag.
<H1 style=textsize:14>
The above formatting is called inline style.An embedded style can be made by typing some property and values inside the heading tags
Sample code for embedded style:
<style>
H1
{
fontcolor:blue;
}
</style>
Fonts:
In HTML, we can specify a font type and size as follows:
<font face="arial,times new roman">ABC</font>
The same can be done with CSS as follows:
Font face:arial,Timesnew roman;
Sample web page using above concepts:
<html>
<head>
<title>New webpage</title>
<style>
H1
{
fontsize:14;
fontytype:arial,time new roman;
}
</style>
<body>
<font color="blue">The text is in blue</font>
</body>
</html>