Article image Introduction to HTML: basic structure, tags and attributes: Input tags

4.11. Introduction to HTML: basic structure, tags and attributes: Input tags

Page 15 | Listen in audio

Introduction to HTML: Basic structure, tags and attributes: Input tags

Introduction to HTML

HTML, which stands for HyperText Markup Language, is the standard markup language for creating web pages. HTML describes the structure of a web page and consists of a series of elements. HTML provides the basic structure of the page, on top of which layers of style and behavior are added.

Basic structure of HTML

An HTML document begins with the document type . The HTML document itself starts with the tag and ends with . The visible content of the web page is enclosed between and .

<!DOCTYPE html>
<html>
<head>
<title>Page title</title>
</head>
<body>

The page content goes here...

</body>
</html>

HTML Tags and Attributes

HTML elements are defined by tags, surrounded by angle brackets. HTML tags are usually in pairs like <h1> and </h1>, but some represent empty elements and are incomplete, like <img>< /b>. HTML attributes provide additional information about elements. They always come in name/value pairs, like: name="value".

Input tags

The input tag is one of the most important elements of HTML for user interaction. The tag can be displayed in several ways depending on the attribute type.

<input type="text"> 
<input type="radio"> 
<input type="submit"> 

Some of the most common attributes that accompany the input tag include the 'value' attribute, which defines the initial value of the control, and the 'name' attribute, which defines the name of the control.

<input type="text" value="Name">
<input type="radio" name="genre">

Conclusion

HTML is an essential markup language for any web developer. It provides the basic structure of the page, which is then enhanced with CSS for style and JavaScript for behavior. Understanding the basic structure of HTML, tags and attributes, especially the input tag, is critical to creating interactive and dynamic web pages.

Note: This is just an example of how an HTML document is structured. In practice, you will probably have many more tags to format your content. Also, remember that it is good practice to always close your HTML tags to avoid any possible browser confusion.

Now answer the exercise about the content:

According to the text, which of the following statements is true about HTML?

You are right! Congratulations, now go to the next page

You missed! Try again.

Article image Introduction to HTML: basic structure, tags and attributes: Button tags

Next page of the Free Ebook:

16Introduction to HTML: basic structure, tags and attributes: Button tags

5 minutes

Earn your Certificate for this Course for Free! by downloading the Cursa app and reading the ebook there. Available on Google Play or App Store!

Get it on Google Play Get it on App Store

+ 6.5 million
students

Free and Valid
Certificate with QR Code

48 thousand free
exercises

4.8/5 rating in
app stores

Free courses in
video, audio and text