I just started to learn Html.And I realized that it still works when I forget the put slash(/) at the end bracket.For example
Yes it still works But this is somthing which actually causes A bad Style progrmming and if you go along will causes many other problems , in HTML5 they fixed this
Alright,thanks!
I agree with siamak That these codes makes problems but I think your code will not show exactly what you want : because when you type the second <h1> : It's not the end tag for the first one , It's another opening tag ... Example : <h1> Hello <h1> World ! in this case : The word "World" will be typed in the h1 design and also the word " Hello" But if You type : <h1> Hello </h1> World ! Then The world "Hello" Will be typed in the h1 design but NOT the word "World" So the first example Should be : <h1>hello <h1>World </h1></h1> to be a right code
They include this feature that tries to guess your meaning to reduce mistakes, but as a page contains more complex nesting of tags, it will stop working. The parser is filling in the slashes for you; they are actually necessary.
The main point of learning "proper" technique in this respect is for XML. Look up xhtml. XML is like a universal data organizer. If you get deep into development, you will probably be writing some XML. xhtml is necessary for the implementation of XML.
The HTML spec, around HTML3, got very tolerant of mistakes. Now that pages are more complicated, that leads to bloated browser programs, and slow page rendering. HTML4 and later are trying to get stricter with structure so that the browsers render more efficiently. Your error is currently being tolerated. Down the road, it won't be.
Join our real-time social learning platform and learn together with your friends!