Introduction to HTML
In this section, you will learn the basics of HTML, the foundation of web development, and create your first web page. HTML stands for HyperText Markup Language. It is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.
What is HTML?β
HTML is the standard markup language for creating web pages. It stands for Hyper Text Markup Language. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and other objects, such as interactive forms, may be embedded into the rendered page. HTML provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes, and other items. HTML elements are delineated by tags, written using angle brackets. Tags such as <img />
and <input />
directly introduce content into the page. Other tags such as <p>
surround and provide information about document text and may include other tags as sub-elements. Browsers do not display the HTML tags, but use them to interpret the content of the page.
What is a Web Page?β
A web page is a document that is suitable for the World Wide Web and web browsers. A web browser displays a web page on a monitor or mobile device. The web page is what displays, but the term also refers to a computer file, usually written in HTML or comparable markup language. Web browsers coordinate the various web resource elements for the written web page, such as style sheets, scripts, and images, to present the web page.
Creating Your First Web Pageβ
To create your first web page, you need to create an HTML file. An HTML file is a text file that contains the HTML code for your web page. You can create an HTML file using a text editor such as Notepad or a code editor such as Visual Studio Code.
Here is an example of a simple HTML file:
<!doctype html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>Welcome to my first web page.</p>
</body>
</html>
Hello, World!
Welcome to my first web page.
In this example, the HTML file contains the following elements:
<!DOCTYPE html>
: This declaration defines the document type and version of HTML.<html>
: This element is the root element of an HTML page.<head>
: This element contains meta-information about the HTML document.<title>
: This element specifies the title of the HTML document.<body>
: This element contains the content of the HTML document.<h1>
: This element defines a heading.<p>
: This element defines a paragraph.- The text between the opening and closing tags of each element is the content of that element.
- The HTML file is saved with the
.html
extension, such asindex.html
. - You can open the HTML file in a web browser to view the web page.
Congratulations! You have created your first web page using HTML. In the next section, you will learn more about HTML elements and attributes.
Why Learn HTML?β
HTML is the foundation of web development. Learning HTML is essential for anyone who wants to create web pages and web applications. HTML is easy to learn and use, making it an ideal starting point for beginners. By learning HTML, you will gain a solid understanding of how web pages are structured and how content is displayed on the web.
- First version of HTML was introduced in 1991 by Tim Berners-Lee.
- HTML stands for Hyper Text Markup Language.
- Tim Berners-Lee is the inventor of the World Wide Web. He is a British computer scientist who invented the World Wide Web in 1989 while working at CERN.
- HTML is the standard markup language for creating web pages.
- There are many versions of HTML such as HTML 4, HTML 5, and XHTML.
Summaryβ
In this section, you learned the basics of HTML, the foundation of web development. You created your first web page using HTML and learned about HTML elements and attributes. HTML is the standard markup language for creating web pages, and it is essential for anyone who wants to create web pages and web applications. In the next section, you will learn more about HTML elements and attributes.