How to Add HTML Elements to a Web Page
We will demonstrate how to add some of the mostly used HTML elements to a web page in this tutorial.
Everything you see on a web page is made of HTML elements. To add an HTML element to a web page, you simply add the opening tag, the content of the element and the closing tag like the following:
<p>This is a paragraph.</p>
The above code represents a paragraph element in HTML and you will see how it is constructed below.
|This is a paragraph.||content|
Some HTML elements have self-closing tags like the image element.
In the example below, you will see a number of HTML elements that are used commonly in web pages:
<p>Hi, I am Alex and this is my website about cats.</p>
<p>Here is a picture of my cat:</p>
<p>Please click the link below to learn more about me:</p>
<a href="about-me.html">About Me</a>
The above example demonstrates the following HTML elements:
You can create a basic web page and put the above code into that page and see how it works. You can replace the image file, cat.jpg, as you wish.
More HTML Tips
How to View HTML Source Code of a Web Page How to Declare Doctype for an HTML Document How to Add Attributes to HTML Elements How to Edit an HTML File How to Create a Basic Website with HTML How to Add Headings in HTML How to Add Comments in HTML How to Create a Basic Web Page with HTML How to Add Horizontal Lines to a Web Page How to Add Paragraphs in HTMLHTML Tips