Back to Index

unit-2

Creating DOM


Creating a DOM (Document Object Model) typically refers to dynamically generating HTML elements using JavaScript. This allows you to manipulate the structure and content of a webpage dynamically, without needing to reload the entire page from the server.


DocType


In HTML, the <!DOCTYPE> declaration is used to specify the version and type of the document being served. It stands for "Document Type Declaration." This declaration is placed at the very beginning of an HTML document, before the <html> tag.

The <!DOCTYPE> declaration is not an HTML tag; it's an instruction to the web browser about what type of document it is going to render. It helps the browser to render the content correctly by switching to the appropriate rendering mode.


Character Encording

Character encoding is a method used in computing to represent characters from different languages and symbol sets within a document or piece of text. It's crucial for ensuring that text is displayed and interpreted correctly across different systems and software.

There are several character encoding standards, each designed to support specific languages and character sets. Some common character encoding standards include:


Deprecated Elements


Deprecated elements in HTML are those that have been officially discouraged or obsolete in the latest HTML specifications. While web browsers may still support these elements for backward compatibility, their usage is discouraged, and developers are encouraged to use modern alternatives. Deprecated elements may be removed from future HTML specifications altogether.

HTML5 Document (section, article, aside, header, footer, nav, dialog, figure)

Script Tag


The <script> tag in HTML is used to include JavaScript code either directly within the tag or by referencing an external JavaScript file using the src attribute. It can be placed in the <head> or <body> section of an HTML document. The type attribute, specifying the scripting language, is optional in HTML5.


Link Tag


The <link> tag in HTML is used to link external resources such as stylesheets, favicons, and alternate documents. It is commonly used to attach CSS files to HTML documents, but it can also be used for other purposes such as defining relationships between documents or specifying the location of icons.

1. Linking CSS Stylesheets: The <link> tag is commonly used to link external CSS stylesheets to HTML documents. This allows you to separate the presentation (CSS) from the content (HTML) of a web page.

<link rel="stylesheet" type="text/css" href="styles.css">

2. Defining Relationships: The rel attribute specifies the relationship between the current document and the linked resource. For stylesheets, it's typically set to "stylesheet".

3. Specifying the Resource Location: The href attribute specifies the URL of the linked resource (e.g., a CSS file). Relative or absolute URLs can be used.


Web Forms In Detail

Web forms are an essential part of web development, allowing users to interact with websites by submitting data, such as text inputs, checkboxes, radio buttons, and file uploads. Here's a detailed overview of web forms: