HTML Font Tag: How to Change Text Size and Style for Your Webpage

In summary, the conversation is about styling links on a webpage. The first method suggested is using the font tag with a font size attribute, but it is deprecated and not recommended. The second method suggested is using CSS with the a tag and setting the font size to 6. There is also a suggestion to use lowercase letters for tags and to use <br /> instead of <br> for XHTML. The conversation also touches on using an external stylesheet and following proper coding practices.
  • #1
biferi
191
0
When I make a webpage and I want my Text in my Link to be say Font Size 6 am I right I would do this

<font size="6">
<A HREF="form.html" TARGET="B">
<img src="mailbox.gif" width="16%">
<BR>
E-MAIL THE ARTIST
</A>
</font>

Thanks
 
Technology news on Phys.org
  • #2
This is not a good way to do this. You should use CSS to style links.

a { font-size: 6 }

You should also use lowercase letters for your tags.
 
  • #3
I think the simplistic thing that you may be looking for is something like:

<font size="6">E-MAIL THE ARTIST</font>
 
  • #5
<br> should also be <br />, to conform to XHTML.
 
  • #6
StevieTNZ said:
<br> should also be <br />, to conform to XHTML.

Only if you are using the XHTML doc type. HTML5 is gaining speed. :)
 
  • #7
So if I want to make my text in my Link a Font size I do this

<DIV ALIGN="center">
<p style="font-family:Times New Roman;
font-size:16;">

<A HREF="form.html" TARGET="B">
<img src="mailbox.gif" width="16%">
<BR>
E-MAIL THE ARTIST
</A>
</p>
 
  • #9
Having inline styles on individual tags is not easily maintainable. It is highly suggested that you use an external stylesheet and learn CSS.
 
  • #11
<span style="font-size:6">some text in here</span>

OR

<div style="font-size:6">some text in here</div>
 

What is the HTML Font Tag?

The HTML Font Tag is a tag used in HTML to change the font size and style of text on a webpage. It is also known as the <font> tag and is used to specify the font size, color, and face of the text.

How do I use the HTML Font Tag?

To use the HTML Font Tag, you need to wrap the text you want to change with the <font> tag and specify the desired font properties using the size, color, and face attributes.

What are the different font sizes that can be used with the HTML Font Tag?

The font size can be specified using the size attribute with values ranging from 1 to 7, with 1 being the smallest and 7 being the largest. You can also specify the size in pixels using the style attribute.

Can I change the font style using the HTML Font Tag?

Yes, you can change the font style using the face attribute. You can specify the name of the font, such as "Arial" or "Times New Roman", or use the generic font families like sans-serif or serif.

Is the HTML Font Tag still supported in HTML5?

Yes, the HTML Font Tag is still supported in HTML5, but it is no longer recommended. Instead, it is recommended to use CSS to style the font of your webpage as it offers more flexibility and control over the appearance of text.

Similar threads

  • Programming and Computer Science
Replies
14
Views
716
  • Programming and Computer Science
Replies
4
Views
854
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
2
Views
880
  • Sticky
  • Science and Math Textbooks
Replies
27
Views
3K
  • Programming and Computer Science
Replies
2
Views
5K
  • Computing and Technology
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
2
Views
4K
Back
Top