Can you use the same id once for multiple html page? -


i understand concept of 1 id in html page. noob, wondering if can use same id once different html pages. consider sloppy?

for instance, <div id="1"></div> (used once)in index.html , used <div id="1"></div> again in product.html. consider bad?

i tried search found no answers. thank you!

!edit! thank answer guys. appreciated!

an id should used once on single document. used elements should appear once on page anyway (think of "top navigation bar"). classes used elements can appear more once (think of "particularly styled table", "repeatable block of information" or things share particular charasteristics such "on browser width block spans 6 columns" in example bootstrap). normal use same id on different pages. you'll make skeleton/template layout, each element styled same on each page uses template. helpful have same id same element across different pages. (or: considered sloppy change layout of page on every page, using different id's each element, hard or impossible maintain pages.)


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -