The commencement of an HTML document includes a declaration that specifies the version of HTML in which the page is composed. Subsequently, the document is divided into two segments; the head and the body. The <head> section contains metadata and references to scripts and stylesheets while the <body> section houses the content for users, on the page.
Example HTML Document:
<!DOCTYPE html>
<html>
<head>
<title>Sample Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a sample HTML page.</p>
</body>
</html>
The commencement of an HTML document includes a declaration that specifies the version of HTML in which the page is composed. Subsequently, the document is divided into two segments; the head and the body. The <head> section contains metadata and references to scripts and stylesheets while the <body> section houses the content for users, on the page.
Example HTML Document:
<!DOCTYPE html> <html> <head> <title>Sample Page</title> </head> <body> <h1>Welcome to My Website</h1> <p>This is a sample HTML page.</p> </body> </html>
Use the <link> tag inside the <head> to attach an external CSS file.
Comments in HTML are written between <!-- and -->.
HTML entities are used to display reserved or special characters.
The <iframe> tag embeds another webpage within the current page.
The id attribute uniquely identifies a single HTML element.
Hyperlinks are created using the <a> tag with an href attribute.
Use the <img> tag and specify the image source with the src attribute.
Use the target="_blank" attribute inside the <a> tag.
Copyrights © 2024 letsupdateskills All rights reserved