I use this in visual studio but the compiler claimed that h1 cannot be nested in legend element, but browser can render it anyway so i am confused
h1
legend
no it is not valid inside the legend. you can use wc3 validator to validate your code