HTML Basic


In this lecture, we are going to talk about some basic HTML example.

HTML Documents

  1. All HTML documents need to declare the document type. <!DOCTYPE html>
  2. All HTML documents start with <html> tag itself
  3. All HTML documents end with </html> tag itself
  4. All HTML document contains the visual part of the <body> tag

HTML Headings

  1. Headings are used to create a title for the HTML document.
  2. There are 6 types of heading h1 is the most important heading & h6 is the less important heading. h1 heading is also important from an SEO perspective.
HTML
<h1> Heading number 1</h1>
<h2> Heading number 2</h2>
<h3> Heading number 3</h3>
<h4> Heading number 4</h4>
<h5> Heading number 5</h5>
<h6> Heading number 6</h6>
This is our code preview 

HTML Paragraphs

HTML paragraphs are defined with the <p> tag

HTML
<p> This is a paragraph </p>
<p> This is a another paragraph </p>

HTML links are defined with the <a> tag

HTML
<a href="https://www.html.org.in"> This is a link </a>
  1. The link's destination is specified in the href attribute.
  2. Attributes are used to provide additional information about HTML elements.
  3. You will learn more about attributes in a later chapter.

HTML Images

HTML images are defined with the <img> tag
  1. We use (src) for source file.
  2. We use (alt) for alternative text.
  3. We use (width) for width of image.
  4. We use (height) for height of image.
  5. We use (title) for title of image.
HTML
<img src="html-org-in.png" alt="html.org.in" width="250" height="250" >

Html Media tag

  • There are some special tags which are used to add Videos & Audios in your Html page!
  • You can add videos in your HTML page using the <video> tag
HTML
<video controls>
<source src="your file.mp4">
</video>
  • By the use of this tag you'll get some features in your video like:
    1. Play/Pause
    2. Volume
    3. Fullscreen
    4. etc.
  • Similarly, you can add audios in your HTML page using the <audio> tag
HTML
<audio controls>
<source src="your file.mp3">
</audio>

That's all for this lesson, see you next one.

Search