- Html stands for Hypertext Markup Language.
- Html is the standard markup language used to describe the structure of webpages. It means you use HTML to simply "mark-up" a text document with tags that tell a Web browser how to structure it to display.
- Its pages has the extension .html or .htm
Browsers do not display the html tags, but used them to render the content of the page.Elements:
Html is the basic language to design a webpage and most important to learn to be a web designer. Without html there is no webpage.
Html has multiple elements that are the building blocks of webpages. HTML documents imply a structure of nested HTML elements. Html elements are represented by tags. Generally, its elements has a starting tag and an ending tag. The text content of the element, if any, is placed between these tags. These are indicated in the document by HTML tags, enclosed in angle brackets like <p>
Attributes:
The start tag may also include attributes within the tag which indicate information
Some elements, such as the line break <br>, do not permit any embedded content, either text or further tags. These require only a single empty tag and do not use an end tag.
The general form of an HTML element is therefore:
<tag attribute1="value1" attribute2="value2"> content </tag>
Some HTML elements are defined as empty elements and take the form
<tag attribute1="value1" attribute2="value2">
Empty elements may enclose no content, for instance, the <br> tag or the inline <img> tag. The name of an HTML element is the name used in the tags. Note that the end tag's name is preceded by a slash character, "/", and that in empty elements the end tag is neither required nor allowed. If attributes are not mentioned, default values are used in each case.
Sample Page in Html:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Html Page</title>
</head>
<body>
Hello World! This is my first html page.
</body>
</html>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Html Page</title>
</head>
<body>
Hello World! This is my first html page.
</body>
</html>
Open the webpage in any browser and you can see the result.
Let me know in the comment section if you have any question.
Previous Post:
Program that adds two floating point numbers and shows the sum on screen in C++
Next Post: