+ 3
What's the meaning of semantic (html)?
3 ответов
+ 7
Semantic elements to me just means adding symbolic meaning
For example <b> tag makes the text bold <strong> does the same thing in terms of formating but it adds a symbolic "this text should be strongly emphasized"
We add symbolic meaning to our html elements to aide outside programs such as web crawlers, website builders, readers and so on so that they understand the semantic meaning of elements.
Hope that makes sense
+ 4
Semantics is a term from linguistics (study of languages) and it means how the content and meaning are related to the "text" - in this case to the HTML code.
On the other hand, syntax deals with the structure and lexical elements of the language, for example in HTML this means you use valid tags and attributes, you enclose the content with opening and closing tags, etc.
Semantic correctness means that you use the appropriate tags relevant for the content. For example you put the page heading in H tags, the lists in UL / OL tags, the content of the page structured in SECTION / ARTICLE tags as per HTML5.. and so on.
+ 1
thanks. Its clear now.