Recents in Beach

Learn HTML || Chapter 9


HTML Code Element :-

The HTML <code> element is used to define a section of computer code. It is used to represent a fragment of a source code, such as a file name or a function name. This element is used to markup code snippets, which are typically displayed in a monospaced font. The <code> element is ideal for displaying programming language source code, but can also be used to display any type of computer code. The <code> element is an inline element, meaning that it does not require a closing tag and can be used within a sentence. It is commonly used with the <pre> element for displaying longer code blocks, as the <pre> element does require a closing tag. Additionally, the <code> element may be styled using the style attribute and CSS. It is important to note that the <code> element does not display the actual code, but instead displays the code as text. This is important for displaying computer code in a browser without the code being interpreted as actual HTML or JavaScript.

Attributes :)

1. src: This attribute is used to specify the URL of a file that should be loaded. This attribute is commonly used with the <script> and <img> elements.
2. href: This attribute is used to specify the URL of a page that should be linked to. This attribute is commonly used with the <a>, <link>, and <area> elements.
3. class: This attribute is used to assign a class name to an element. This attribute can be used to assign multiple classes to an element, as well as to style elements using CSS.
4. id: This attribute is used to assign a unique identifier to an element. This attribute can be used to assign a unique style to an element, as well as to target an element using JavaScript.
5. style: This attribute is used to specify CSS styles for an element. This attribute allows you to inline style an element, and is commonly used to override styles set in a style sheet.
6. title: This attribute is used to specify additional information about an element. This attribute is commonly used with the <a> and <img> elements, and is displayed as a tooltip when the element is hovered over.
7. alt: This attribute is used to specify alternative text for an element. This attribute is commonly used with the <img> element, and is displayed if the image cannot be loaded.

HTML Col Element :-

The HTML <col> element is used to define column properties for each column within an <colgroup> element. It is used to specify the alignment, visibility, width, and other style information for the columns of an HTML table. It is an optional element and can be used in conjunction with the <colgroup> tag to define column properties for an entire table or for individual columns. It provides a way to give an entire column of a table a set of common attributes.

Attributes :)

1. span: This attribute specifies the number of columns a <col> element should span. It is an optional attribute. 2. width: This attribute specifies the width of a column. It is an optional attribute. 3. align: This attribute specifies the horizontal alignment of content in a column. It is an optional attribute. 4. valign: This attribute specifies the vertical alignment of content in a column. It is an optional attribute. 5. char: This attribute specifies the character to align the content of a column on. It is an optional attribute. 6. charoff: This attribute specifies the number of characters to offset the content of a column from the char attribute. It is an optional attribute. 7. style: This attribute specifies an inline style for the element. It is an optional attribute. 8. class: This attribute specifies the class of the element. It is an optional attribute.

HTML Colgroup Element :-

The <colgroup> element in HTML is used to group columns in an HTML table for formatting purposes. It allows you to assign a specific style to multiple columns, including a width, color, and font. The <colgroup> element should be placed inside the <table> element and should contain one or more <col> elements that define the attributes of each column. The following is a list of HTML colgroup attributes with explanation: 1. span: specifies the number of columns that should be included in the column group.
2. width: specifies the width of the column group in pixels or as a percentage of the total table width.
3. align: specifies the horizontal alignment of the content within the column group.
4. valign: specifies the vertical alignment of the content within the column group.
5. char: specifies the character that should be used to align the content within the column group.
6. charoff: specifies the number of characters that should be used to offset the alignment of the content within the column group.
7. style: specifies an inline CSS style for the column group.

HTML Data Element :-

The HTML <data> element is an inline element that allows developers to provide machine-readable information alongside visible content on a web page. It is an element used for storing data in an HTML document and is generally used for providing information about a particular element on the page. The <data> element is a simple element, allowing developers to provide machine-readable information about a specific elements content. This data can be used by browsers, search engines, and other web applications to process the information on the page.

Attributes :)

1. value - This attribute is used to specify the value of the data element.
2. title - This attribute is used to provide a machine-readable title for the data element.
3. lang - This attribute is used to specify the language of the data element.
4. itemprop - This attribute is used to provide an itemprop attribute to the data element.
5. datetime - This attribute is used to specify the date and time of the data element.
6. itemscope - This attribute is used to specify that the data element contains an itemscope.
7. itemtype - This attribute is used to specify the itemtype of the data element.
8. itemid - This attribute is used to provide a unique identifier for the data element.
9. itemref - This attribute is used to specify additional elements to which the data element applies.
10. data-* - This attribute is used to provide custom data attributes for the data element.

HTML Datalist Element :-


The HTML <datalist> element is used to provide a list of predefined options to users when they enter data into an input field. It provides a flexible way for developers to present users with a list of valid options for a given input field, allowing users to quickly and easily select from the list. This element is especially useful when the list of valid options is too large to fit into a drop-down menu, or when the list of valid options may change over time. When a user enters data into an input field with a <datalist> element, the list of options is automatically filtered according to the user's input, making it easier for users to find the option they are looking for.

Attributes :)

1. list: This attribute is used to specify the id of the <datalist> element that should be used to provide the list of predefined options.
2. disabled: This attribute is used to specify whether the <datalist> element should be disabled or not.
3. autocomplete: This attribute is used to specify whether the <datalist> should automatically complete the user's input as they type.
4. autofocus: This attribute is used to specify whether the <datalist> element should receive focus when the page loads.
5. form: This attribute is used to specify the form the <datalist> element belongs to.
6. name: This attribute is used to specify the name of the <datalist> element.
7. placeholder: This attribute is used to specify placeholder text for the <datalist> element.
8. readonly: This attribute is used to specify whether the <datalist> element should be read-only or not.
9. multiple: This attribute is used to specify whether multiple options can be selected from the list of predefined options.
10. size: This attribute is used to specify the size of the <datalist> element.

Post a Comment

0 Comments