HTML vs XHTML : Excuse me! Webie question ?

Discussion in 'HTML - XHTML - CSS' started by Adamsom, Jan 6, 2010.

  1. Adamsom New Member

    Hi All,


    What is the XHTML Code for the following decaprecated HTML codes.

    <center> Deprecated. Defines centered text
    <font> Deprecated. Defines text font, size, and color
    <u> Deprecated. Defines underlined text

    I want the XHTML code to use font, underline, and center alignment.

    Thank you if you help.
    --------------------------
  2. Mimoun Administrator

    <center>

    A replacement for center is to use CSS to apply the attribute to the element that needs it.

    example:

    Code:
    p {
        text-align: center;
    }
    For <font> use css to apply font styling to your text, example:
    Code:
    p {
        font-family: verdana, arial, sans-serif;
        font-size: 14px;
        font-style: normal;
        font-weight: bold;
    }
    <u>

    Don’t use this, because it underlines text and underline text is used for links.
    If you want to emphasize text it is better to use <em> or <strong>.


    If you still need to underline text anyway use CSS

    Code:
    p {
        text-decoration: underline;
    }