Between code lines

I am just starting and have a very basic question.

I’ve learned so far that you start most lines with (in the example of a form) < form > and close with < /form >

Having said that I’ve noticed that some elements must go before the opening closes, like:

< form **action="/url-where-you-want-to-submit-form-data"**> 
 < /form >


< form action >
> /url-where-you-want-to-submit-form-data" > 
< /form >

How would I know what goes inside what?
I am sure there must be a logic behind it! :slight_smile:


HTML is made up of “elements”, like the form element. Most elements have an opening and closing “tag”, although there are some that consist of a single “self-closing” tag. The tags are what is between the angle brackets (< and >). Any attributes or properties of an element, like “action”, need to be in the opening tag.