HTML, or HyperText Markup Language, is the standard markup language used to create web pages. It is used to structure and format content on the web and is an essential part of web development. In this blog post, we’ll explore the basics of HTML, including its history, the different types of HTML tags, and how to use HTML to create a basic web page.
History of HTML:
HTML was first developed in the late 1980s by Tim Berners-Lee, a researcher at CERN (the European Organization for Nuclear Research). At the time, Berners-Lee was looking for a way to organize and share information on the internet, and he developed HTML as a way to mark up documents with tags that could be used to structure and format content.
The first version of HTML, called HTML 1.0, was released in 1993, and it quickly became the standard for creating web pages. Since then, there have been several updates to HTML, with the most recent version being HTML 5.0, which was released in 2014.
Types of HTML tags:
HTML uses tags to structure and format content. There are two types of HTML tags: opening tags and closing tags. An opening tag is a tag that is used to mark the beginning of an element, and it is written like this: <tag>. A closing tag is a tag that is used to mark the end of an element, and it is written like this: </tag>.
For example, the opening tag for a paragraph element is <p>, and the closing tag is </p>. Any content that appears between the opening and closing tags will be formatted as a paragraph.
Some common HTML tags include:
- Headings: Headings are used to create headings and subheadings on a web page. There are six levels of headings, ranging from <h1> (the largest) to <h6> (the smallest).
- Paragraphs: Paragraphs are used to create blocks of text on a web page. As mentioned above, the opening tag for a paragraph is <p>, and the closing tag is </p>.
- Links: Links are used to create hyperlinks on a web page. The opening tag for a link is <a>, and the closing tag is </a>. The link’s destination is specified using the “href” attribute, like this: <a href=”http://www.example.com”>Link text</a>.
- Images: Images are used to display images on a web page. The opening tag for an image is <img>, and the closing tag is not required. The image’s source is specified using the “src” attribute, like this: <img src=”image.jpg”>.
Creating a basic web page:
To create a basic web page using HTML, you’ll need a text editor and a web browser. Some popular text editors include Notepad (for Windows) and TextEdit (for Mac).
To create a basic web page, follow these steps:
- Open your text editor and type the following code:
<!DOCTYPE html> <html> <head> <title>My Web Page</title> </head> <body>
- Add your content between the <body> tags. For example, you might add a heading and a paragraph like this:
<h1>Welcome to My Web Page</h1>