/    Sign up×
Community /Pin to ProfileBookmark

html5 ready code

Within an old webpage I find the current <table> declarations:

[code]
<table border=”0″ cellpadding=”0″ cellspacing=”0″>
</table>
[/code]

And off course, my Visual Studio complains:

[list]

  • [*]

    border is an obsolete element


  • [*]

    cellpadding is an invalid attribute in html5


  • [*]

    cellspacing is an invalid attribute in html5


  • [/list]

    I’m wondering, how do I fix this? I guess by defining a class in css? And if so… how?

    to post a comment
    HTML

    4 Comments(s)

    Copy linkTweet thisAlerts:
    @cootheadFeb 07.2019 — Hi there fysicus,

    this site ...

    [url=https://developer.mozilla.org/en-US/][color=#069]Resources for developers, by developers.[/color][/url]

    ...is very useful for general coding information and instruction.

    For your problem, in particular though, go here...

    [url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table][color=#069]The Table element[/color][/url]

    _coothead_
    Copy linkTweet thisAlerts:
    @NogDogFeb 07.2019 — Yes, use CSS to control visual presentation, not HTML. Staying with MDN, here's an article on table-related CSS: https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_boxes/Styling_tables
    Copy linkTweet thisAlerts:
    @LearnTheNewFeb 12.2019 — Hi, @fysicus you must give the values for the cellpadding and cellspacing unless it will show error.
    Copy linkTweet thisAlerts:
    @cootheadFeb 12.2019 — > @LearnTheNew

    **[color=#069]you must give the values for the cellpadding and


    cellspacing unless it will show error.[/color]
    **


    That is absolute nonsense. ?

    Those two attributes have been deprecated since 1997

    when HTML 4 was released and should not be used.

    _coothead_
    ×

    Success!

    Help @fysicus spread the word by sharing this article on Twitter...

    Tweet This
    about: ({
    version: 0.1.9 BETA 4.26,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...