1 Minute HTML CSS Part 2 – HTML Tags

HTML TAGS

<h1>Hello World</h1>
<p>HTML is nothing but text with formatting.</p>
  • HTML stands for Hyper Text Markup Language.
  • It is nothing more than “plain text with formatting”.
  • E.G. <h1> marks a heading, <p> marks a paragraph.
  • HTML tags should be in small letters – <h1><p>.
  • Capital letters work but do not conform to coding standards…

 

OPENING & CLOSING TAGS

  • Tags usually come in pairs.
  • <h1><p> is called the “starting/opening tag”, marking where the heading/paragraph begins.
  • </h1></p> is called the “ending/closing tag”, marking where the heading/paragraph ends.

 

SELF-CLOSING TAGS

<br>
<img src="image.png">
  • Self-closing tags – Tags that don’t require closing tags.
  • E.G. <br> Line break and <img> Image.

 

ATTRIBUTES

  • Take note that the image has an “image source” attribute to define which image to display – src="image.png".
  • src is called the property. Small letters.
  • "image.png" is called the value. Can be enclosed in either double or single quotes.