Why is using the style-attribute in html bad?

后端 未结 4 2056
南方客
南方客 2020-12-18 21:34

I have been told, as well as read that using the style attribute in html is considered bad/sloppy/poor form. Further, that all rendering specific bits should be divorced in

4条回答
  •  天涯浪人
    2020-12-18 22:02

    By separating markup and css. You can use css to change the look of everything, without affecting the markup.

    Benefits include: Creating different designs for the same html. Dividing work within a team. One front-end developer can focus entirely on the css. Back-end developers, do not have to hassle with the css. Easier to change the look in the future. Easier to migrate the html-markup to a new platform or content management system in the future.

提交回复
热议问题