4.6. Introduction to HTML: Basic Structure, Tags and Attributes: Paragraph Tags
Page 10 | Listen in audio
4.6. Introduction to HTML: Basic structure, tags and attributes: Paragraph tags
HTML, which stands for Hyper Text Markup Language, is the standard language for creating web pages and applications. Along with CSS and JavaScript, HTML is a fundamental technology used by most websites to create visually appealing web pages, user interfaces for web applications, and user interfaces for many mobile applications.
The basic structure of an HTML document begins with the document type declaration . This declaration is used to tell the browser that the page is an HTML5 document. Next, we have the html tag that indicates the beginning of the HTML document. Within this tag, we have two main sections, the head and the body.
The head section contains information about the document, such as the title that is displayed in the browser's title bar and links to the CSS files that style the document. The body section contains the actual content of the web page, such as text, images, videos, links, tables, lists, and more.
Within HTML, we use tags to create elements. Tags are used to mark the beginning and end of an element, such as a paragraph, an image, or a link. For example, the paragraph tag is
. To create a paragraph, we place the paragraph text between the opening
tag and the closing
tag.The paragraph tag is one of many HTML tags we use to structure content on a web page. Other common tags include the header tag (h1 to h6), the image tag (img), the link tag (a), the list tag (ul, ol, li), the table tag (table, tr , td) and many more.
In addition to marking the beginning and end of an element, HTML tags can also contain attributes. Attributes provide additional information about the element. For example, the image tag (img) usually contains src and alt attributes. The src attribute specifies the URL of the image, and the alt attribute provides alternative text for the image.
In summary, the basic structure of an HTML document consists of a document type declaration, followed by the html tag that contains the head and body sections. Within these sections, we use tags to create elements and attributes to provide additional information about those elements.
Learning the basic structure of HTML and understanding how to use tags and attributes is the first step to becoming a front-end developer. With this solid foundation, you can move on to more advanced topics like CSS and JavaScript and start creating interactive, visually appealing web pages and web applications.
Now answer the exercise about the content:
What is the function of the paragraph tag in HTML?
You are right! Congratulations, now go to the next page
You missed! Try again.
Next page of the Free Ebook: