Basic text formatting options
I am new to HTML (well, more than new) and I try to format the presented text. The following code is presented:
<H1 ali开发者_StackOverflow中文版gn="center" face="helvetica">
This is another paragraph.
</H1>
<p>
<font align="center" size="5" face="helvetica" >
This is another paragraph.
</font>
</p>
In the first time, the allign works fine though the face is not. On the other hande, in the second time, the size and the face work ok but align is not. Do I do something work?
In general is there any good *and free) resources on line?
Thanks in advance, Sun
You need to learn CSS.
Basically, you stop with these presentational attributes, and you add the styling of your site externally (though it can be inline as well, as CSS).
It looks like you are learning HTML from an old and/or bad resource.
Try
- HTMLDog
- Google: HTML, CSS, and Javascript from the Ground Up
- W3C HTML wiki which also has listed a few good resources
<h1 align="center" face="helvetica">
This is another paragraph.
</h1>
<p align="center" >
<font size="5" face="helvetica" >
This is another paragraph.
</font>
</p>
Try that.
It's best you take a look at the basics of CSS, (www.thenewboston.com) I find to be the best source of beginner tutorials.
This is how your code would be layed out IF you were using CSS.
<style>
h1 {font-family:Helvetica; text-align:center;}
p {font-family:Helvetica; font-size:5px; text-align:center;}
</style>
<body>
<h1>This is another paragraph.</h1>
<p>
This is another paragraph.
</p>
</body>
Hope this helps and good luck working with HTML, CSS and JS in the future!
Regards!
精彩评论