HTML tags
( <h1>, <p>, <img>, etc), attributes, elements, and document structure which collectively form a working web page. In this guide, we will be covering basic HTML concepts with examples and learn how to create a web page.
Following HTML example demonstrates various levels of headings −
<!DOCTYPE html> <html> <head> <title>Heading Example</title> </head> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> </body> </html>
The <p> tag offers a way to structure your text into different paragraphs.
<html> <head> <title>Paragraph Example</title> </head> <body> <p>Here is a first paragraph of text.</p> <p>Here is a second paragraph of text.</p> <p>Here is a third paragraph of text.</p> </body> </html>
The <br /> tag has a space between the characters br and the forward slash. If you omit this space, older browsers will have trouble rendering the line break,
<html> <head> <title>Line Break Example</title> </head> <body> <p>Hello<br /> You delivered your assignment on time.<br /> Thanks<br /> Mahnaz</p> </body> </html>
What are HTML Attributes?
Attributes contain additional pieces of information. Attributes take the form of an opening tag and additional info is placed inside.
An example of an attribute is:
<img src="interntpoint.jpg" alt="A photo of my Home.">