Free Ebook cover Complete HTML, CSS and Javascript course to become a Front End Developer

Complete HTML, CSS and Javascript course to become a Front End Developer

3.79

(14)

125 pages

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

Capítulo 15

Estimated reading time: 4 minutes

Audio Icon

Listen in audio

0:00 / 0:00
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.

Continue in our app.

You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.

Or continue reading below...
Download App

Download the app

<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.

The text clearly states that HTML is a markup language, not a programming language, and does not support the development of games. Additionally, it explains that while HTML tags are often paired, there are exceptions like <img> which are not. The importance of the input tag for user interaction is explicitly mentioned, confirming that option 3 is correct.

Next chapter

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

Arrow Right Icon
Download the app to earn free Certification and listen to the courses in the background, even with the screen off.
  • Read this course in the app to earn your Digital Certificate!
  • Listen to this course in the app without having to turn on your cell phone screen;
  • Get 100% free access to more than 4000 online courses, ebooks and audiobooks;
  • + Hundreds of exercises + Educational Stories.