xml - Are the attributes of an HTML-element part of the tag? -


i've got prepare workshop html-beginners , came across on following.

if have ...

<p>this text-node.</p> 

... <p> , </p> tags. whole thing '<p>this text-node.</p>' element.

so far, good.

but when i've attributes in '<p class="foobar">this text-node.</p>' ...

is attribute part of tag?

means: tag opening bracket closing bracket including attributes? or have got wrong? please correct me.

your understanding correct. attributes declared within start tag part of start tag. true in both html , xml.

to clear, attributes pertain element, , not tag, since tag element declaration if (for lack of better term). however, attr=value notation indeed part of start tag.

for purposes of introductory workshop, distinction in attributes not important. what's more important (and mean very important) distinction between elements , tags.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -