Curriculum
HTML (Hypertext Markup Language) is a markup language used to create web pages. It’s the foundation of the World Wide Web and is used to structure content on web pages, including text, images, and multimedia. In this lesson, we’ll cover the history of HTML, what it is, and how it works.
HTML was first introduced in 1991 by a British computer scientist, Tim Berners-Lee. At the time, he was working at CERN, the European Organization for Nuclear Research, looking for a way to share information more easily between scientists.
The first version of HTML was simple and only included a few tags, such as <head>, <title>, and <body>. Over time, HTML evolved to include new tags and attributes, which allowed for more complex and interactive web pages.
HTML is a markup language that uses tags to structure content on web pages. Tags are enclosed in angle brackets (<>) and are used to define elements on a web page, such as headings, paragraphs, images, and links.
Here’s an example of HTML code that creates a basic web page:
<!DOCTYPE html> <html> <head> <title>My Web Page</title> </head> <body> <h1>Welcome to My Web Page</h1> <p>This is a paragraph of text.</p> <img src="myimage.jpg" alt="My Image"> <a href="http://www.example.com">Visit Example.com</a> </body> </html>
In this code, the <html> tag defines the beginning and end of the web page, and the <head> tag contains information about the page, such as the title. The <body> tag includes the content of the web page, including a heading (<h1>), a paragraph (<p>), an image (<img>), and a link (<a>).
When a web browser loads a web page, it reads the HTML code and renders the content on the screen. This process, called parsing, involves interpreting the HTML tags and elements to determine how the content should be displayed.
For example, the <h1> tag creates a heading, and the browser typically displays it as a large, bold text at the top of the page. The <p> tag is used to create a paragraph, and the browser will display it as a block of text with a line break before and after.
HTML also allows for the inclusion of other technologies, such as CSS (Cascading Style Sheets) and JavaScript, which can be used to add style and interactivity to web pages.