+ 1
What is syntax and semantics
I'm confused as what is syntax and semantics in HTML. I have already researched about it in web but not getting the point.😩 Can someone please teach me in simple terms as what they mean???????????????
9 ответов
+ 2
Yes. Some developers use a master reset css stylesheet from the outset when starting their project. This will override what the browser has by default.
This can be tricky though. If you have a section of your website and you want to style it differently, if you use a css reset stylesheet, you will lose the whole theme and layout of your website.
If you want more control on elements (html tags) when styling, consider using
"!important " in some of your css to override inheritance.
+ 3
Semantics is meaning. In HTML, we have a head tag, meaning the head or top of the document. A body tag, meaning the main content. A footer meaning the feet, bottom of the document. Article tag for an article of text. P tag for a paragraph block of text.
The tags have identifiable meaning for the developer and the browser. This is semantics.
Syntax is the actual grammatical code of the language.
HTML syntax adheres to opening and closing (where needed) tags correctly. <></>
Syntax in HTML5 adheres to declaring a DOCTYPE. If styling tags inline via css, syntax adheres to - style="property:attribute;"
Syntax means the correct coding symbols/grammar for the language to output the desired results correctly.
+ 1
You could say that. Think about the tags and meaning.
Examples:
br tag = BReak
hr tag = Horizontal Rule
i tag = Italic
b tag = Bold
ol = Ordered List
li = LIst
div = DIVision
And I could keep going.
Again, semantics of Html means the meaning of the code.
The tags are memorable and identifiable.
+ 1
Syntax is the typing of the correct code to make the language work. If you miss semicolons or closing of tags or parentheses or misspell code words, you will have a syntax error for the language you are coding in.
+ 1
Yes, according to your needs. You could have a master reset css for eveything and then make smaller reset css sheets for elements you want to reset and call on these when needed.
0
#xyenia so all the tags in the html are semantic tags
0
#xyenia and syntax means as the rules by which the symbols of any language made into working by defining it's definite order
0
#Xyenia if I apply CSS reset so will it apply it's unique style to whole html code?
0
Well, there may be option to modify CSS reset according the need