HTML Essentials: The Top 10 Tags Every Web Developer Should Know
HTML is like the building blocks of web pages. It's a language that uses tags to create the structure and content of a webpage. In this blog, we'll go over some of the key HTML tags that every web developer should know.
<!DOCTYPE html> - This tag is used to declare the HTML version being used on the web page. The current HTML version is HTML5, and the doctype declaration for HTML5 is:
<!DOCTYPE html>
<html> - This tag defines the beginning and end of an HTML document. All other HTML tags are nested within the <html> tag.
<html> <!-- HTML content goes here --> </html>
<head> - This tag contains meta-information about the web page, such as the title, author, and keywords. It doesn't contain any visible content on the page.
<head> <title>Page Title</title> <meta name="description" content="Page description"> <meta name="keywords" content="keyword1, keyword2, keyword3"> </head>
<body> - This tag contains all the visible content of the web page, such as text, images, and videos.
<body> <!-- Visible content goes here --> </body>
<h1> to <h6> - These tags are used to define headings of different sizes. <h1> is the largest heading, and <h6> is the smallest.
<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>
<p> - This tag is used to define a paragraph of text.
<p>This is a paragraph of text.</p>
<a> - This tag is used to create a hyperlink to another web page or a file.
<a href="https://www.example.com">Link text</a>
<img> - This tag is used to insert an image into the web page.
<img src="image.jpg" alt="Image description">
<ul> and <li> - These tags are used to create an unordered list.
<ul> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> </ul>
<ol> and <li> - These tags are used to create an ordered list.
<ol> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> </ol>
In this article, we discussed the most important html tags that you need to know for a basic site. Hope you enjoyed!