+ 3

What's the meaning of semantic (html)?

11th Aug 2019, 6:07 AM
𝒜𝓃𝓊𝒿 𝓎𝒶𝒹𝒶𝓋
𝒜𝓃𝓊𝒿 𝓎𝒶𝒹𝒶𝓋 - avatar
3 Answers
+ 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
11th Aug 2019, 8:27 AM
SpaceJam♨
SpaceJam♨ - avatar
+ 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.
11th Aug 2019, 6:47 AM
Tibor Santa
Tibor Santa - avatar
+ 1
thanks. Its clear now.
18th Aug 2019, 1:51 AM
𝒜𝓃𝓊𝒿 𝓎𝒶𝒹𝒶𝓋
𝒜𝓃𝓊𝒿 𝓎𝒶𝒹𝒶𝓋 - avatar