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

  • Context: HTML/CSS 
  • Thread starter Thread starter biferi
  • Start date Start date
  • Tags Tags
    Font Html Tag
Click For Summary

Discussion Overview

The discussion revolves around how to change text size and style on a webpage, specifically focusing on the use of the HTML font tag versus CSS for styling links and text. Participants explore various methods and best practices for achieving desired text formatting.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Conceptual clarification

Main Points Raised

  • One participant suggests using the tag to set text size for links, specifically using .
  • Another participant argues that using CSS is a better practice for styling links, providing an example with a { font-size: 6 }.
  • Some participants note that the tag has been deprecated and emphasize the importance of using CSS for all styling.
  • There are comments regarding the use of lowercase letters for HTML tags and the correct syntax for the
    tag in XHTML.
  • A participant provides an example of using a
    with inline styles for text formatting, but others caution against inline styles for maintainability.
  • Suggestions are made to use external stylesheets for better code management.
  • Examples of using and
    with inline styles are presented as alternatives for text formatting.

Areas of Agreement / Disagreement

Participants generally agree that the tag is outdated and that CSS should be used for styling. However, there is disagreement on the specifics of implementation and the validity of certain HTML practices.

Contextual Notes

Some participants mention the differences between XHTML and HTML5, indicating that certain practices may depend on the document type being used.

Who May Find This Useful

This discussion may be useful for web developers and designers looking to understand best practices for text styling in HTML and CSS, as well as those interested in the evolution of web standards.

biferi
Messages
191
Reaction score
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
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.
 
I think the simplistic thing that you may be looking for is something like:

<font size="6">E-MAIL THE ARTIST</font>
 
The font tag has been deprecated. All styling should be done via CSS.
 
<br> should also be <br />, to conform to XHTML.
 
StevieTNZ said:
<br> should also be <br />, to conform to XHTML.

Only if you are using the XHTML doc type. HTML5 is gaining speed. :)
 
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>
 
Having inline styles on individual tags is not easily maintainable. It is highly suggested that you use an external stylesheet and learn CSS.
 
  • #10
You need to end your DIV tag and align center is not valid.
 
  • #11
<span style="font-size:6">some text in here</span>

OR

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

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K