1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

HTML HTML vs XHTML : Excuse me! Webie question ?

Discussion in 'Web Development' started by Adamsom, Jan 6, 2010.

  1. Adamsom

    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

    Mimoun Administrator Staff Member Director Verified Member

    <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;
    }