+ 6
What is "semantic html"???
6 Respuestas
+ 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.
+ 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.
+ 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.
+ 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.
+ 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
🙂