Professional Documents
Culture Documents
Course
Javed Iqbal
ji.rajpoot@gmail.com
HTML Class 2
Previous Class
• What is HTML?
• HTML Elements
• A Simple HTML Document
• HTML Editor
HTML Class 2
• HTML Headings
• HTML headings are defined with the <h1> to <h6> tags.
• <h1>This is heading 1</h1>
• <h2>This is heading 2</h2>
• HTML Paragraphs
• HTML paragraphs are defined with the <p> tag:
• <p>This is a paragraph.</p>
HTML Class 2
• HTML Links
• HTML links are defined with the <a> tag:
• <a href="https://www.olx.com.pk">This is a link</a>
• HTML Images
• HTML Images are defined with the <img> tag:
• The source file (src), alternative text (alt), width, and height are provided
as attributes:
• <img src=“olx.jpg" alt=“olx.com.pk" width="104" height="142">
HTML Class 2
• HTML Element
• The HTML element is everything from the start tag to the end tag:
• <tagname>Content goes here...</tagname>
• HTML Attributes
• All HTML elements can have attributes
• <a href="https://olx.com.pk">Visit OLX</a>
HTML Class 2
• The src Attribute
• The <img> tag is used to embed an image in an HTML page. The src attribute specifies the
path to the image to be displayed:
• <img src="img_olx.jpg">
• <h1 style="font-size:60px;">Heading 1</h1>
• HTML Paragraph
• The HTML <p> element defines a paragraph.
• <pre>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
</pre>