+ 6

What is "semantic html"???

17th Jul 2018, 10:59 AM
Rikshith U Uchil
Rikshith U Uchil - avatar
6 Answers
+ 4
A semantic element clearly describes its meaning to both the browser and the developer. Examples of non-semantic elements: <div> and <span> - Tells nothing about its content. Examples of semantic elements: <form> , <table> , and <article> - Clearly defines its content.
19th Jul 2018, 7:32 AM
Rikshith U Uchil
Rikshith U Uchil - avatar
+ 8
It is HTML written in such a way that you will have an idea what the page looks like without looking at it. <div><div></div><div></div></div><div></div> can be anything and nothing ("un-semantic"); but <figure><code></code><figcaption></figcaption></figure><p></p> is a code snippet with some description, and a paragraph of text afterwards. And you can tell from just the source, no browser required.
17th Jul 2018, 12:18 PM
Schindlabua
Schindlabua - avatar
+ 2
Semantic HTML is the use of elements that define their meaning to both the developer and the browser. HTML semantic elements include tags like <form>, etc. Here <form> describes the meaning that this tag is used for creating forms.
17th Jul 2018, 2:04 PM
Rafey Iqbal Rahman
Rafey Iqbal Rahman - avatar
+ 2
Hi, I will do my best to explain you as I understood with my poor English. The semantic in HTML is to only look the meaning of tags not the output result. Why ? Because with the CSS you may have visual result you want with général tags like <div>. If you turn of the CSS of your browser and can't distinguish the elements, you don't use correcrly the semantic. For example, if yout want a button in your page, you can make it with the tag <div> using CSS, but if you want to respect the semantic, it's better to use the tag <button>, you can change the style with CSS. if you do that, you will not need to see the outpout result or comments to understand that is a button, the tag is clear for you and for browsers, it's very hepful for blind peoples peoples using sreen readers. The semantic is also the organisation of your code how have to be logic, clear. respect the semantic is to be able to undersrand your code easily, to simplify the CSS, to save time, to incrase web accessibility.
18th Jul 2018, 12:31 AM
DDD
DDD - avatar
+ 1
"Semantic HTML is the use of HTML markup to reinforce the semantics, or meaning, of the information in webpages and web applications rather than merely to define its presentation or look. Semantic HTML is processed by traditional web browsers as well as by many other user agents. CSS is used to suggest its presentation to human users." ~Wikipedia Link: https://en.m.wikipedia.org/wiki/Semantic_HTML 🙂
17th Jul 2018, 11:03 AM
Paul Grasser
Paul Grasser - avatar