HTML Basic Tags

What is Tags in HTML

How many Tags in HTML

There are many HTML tags. But regurlary for web designing we use some tags. Those are -

  1. ** !DOCTYPE html**: This is the first line of code in any HTML document. It defines the document type and helps the web browser to understand how to render the web page. Example - <!DOCTYPE html>
  2. html: This tag is used to start and end an HTML document. Example - <html>
  3. head: This tag contains the meta information about the web page, such as the title of the page, links to stylesheets, and scripts. Example - <head>
  4. title: This tag is used to specify the title of the web page. The title appears in the browser’s title bar and is also used by search engines to display the page’s title in search results. Example - <title>
  5. body: This tag is used to define the content of the web page, including text, images, videos, and other media.
  6. ** h1 - h6**: These tags are used to create headings on a web page. <h1> is the largest heading and <h6> is the smallest heading.
  7. p: This tag is used to create paragraphs on a web page.
  8. a: This tag is used to create hyperlinks on a web page. The href attribute specifies the URL of the page that the link points to.
  9. img: This tag is used to insert images on a web page. The src attribute specifies the URL of the image.
  10. ul and li: These tags are used to create unordered lists on a web page. ul for unordered list and li for list item

Example tags for a page could be like this -

<!DOCTYPE html>
<html>
     <head>
	     <title>Welcome to DevsEnv</title>
	 </head>
	 
	 <body>
		 <h2>Welcome to DevsEnv, I'm a simple h2 tag</h2>
		 <p>Welcome to DevsEnv, I'm a simple p tag</p>
	 </body>
</html>

LIVE Preview

Welcome to DevsEnv, I'm a simple h2 tag

Welcome to DevsEnv, I'm a simple p tag

Another

Previous
How to setup Code Editor to Write HTML Code Efficiently For Beginners
Next
HTML Elements