Theory:

A dialogue is a conversation between two or more people. We write dialogues within quotation marks. Dialogue means what the speaker intends to tell the opposite person.
Dialogue Rules:
1. Make it simple. The dialogues should be simple and clear to understand.

2. Do not divert away from the topic. While writing dialogues, think about what the character has to say exactly. Be precise.

3. Punctuation marks are key in dialogue writing. So, whatever we say should go inside the punctuation.

4. Long speeches will not have quotation marks. Long speeches will have several paragraphs, so they do not end with quotations.

5. Generally, keep a single quotation if you are referring to someone in particular.
Example:
1. “It’s sure cold out here,” Asha said.
2. “Did you say your prayers today?”
3. “What’s the big deal, anyway?” she huffed.
Proper Dialogue Punctuation and Format: There are different types of punctuation (including when to use a comma, quotes, and even dashes) needed to format it properly.
 
Writing DialogueSingle Line:
Single lines of dialogue are among the easiest to write and remember. The punctuation for this dialogue is simple:
 
The quotations go on outside of both the words and end-of-dialogue punctuation (in this case a period, but it’s the same for a comma, question mark, or exclamation point). No matter what other punctuation you have, whether it’s a question mark or exclamation point, it will go on the inside of the quotations.
Example:
1. “You actually shouldn’t have made that.”
2. “What’s the big deal, anyway?” she huffed.
 Writing Dialogue –Single line with tag: 
In this case, “tag” means a dialogue tag.

A dialogue tag is anything that indicates who said what and in what way.
Example:
1. He said.
2. She whispered.
3. They bellowed.