- HTML stands for Hyper Text Markup Language
- HTML is the standard markup language for creating Web pages
- HTML describes the structure of a Web page
- HTML consists of a series of elements
- HTML elements tell the browser how to display the content
- HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
<!DOCTYPE html>declaration defines that this document is an HTML5 document
<html>element is the root element of an HTML page
<head>element contains meta information about the HTML page
<title>element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)
<body>element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
<h1>element defines a large heading
<p>element defines a paragraph
An HTML element is defined by a start tag, some content, and an end tag:
<tagname>Content goes here...
</tagname>The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1> <p>My first paragraph.</p>
HTML tags are like keywords which defines that how web browser will format and display the content. With the help of tags, a web browser can distinguish between an HTML content and a simple content. HTML tags contain three main parts: opening tag, content and closing tag. But some HTML tags are unclosed tags.
When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.
An HTML file must have some essential tags so that web browser can differentiate between a simple text and HTML text. You can use as many tags you want as per your code requirement.
- All HTML tags must enclosed within
< >these brackets.
- Every tag in HTML perform different tasks.
- If you have used an open tag
<tag>, then you must use a close tag
</tag>(except some tags) for example
Examples of tags to name a few
|Start tag||Element content||End tag|
||My First Heading||
||My first paragraph||
Happy Coding To My Fellow Newbies
"Coding Becomes easier when you understand how things works under the hood" - Frank the Code Newbie