Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

HTML & JavaScript

The document provides an overview of HTML, detailing its structure, essential components, and the role of tags and attributes in creating web documents. It explains the significance of DOCTYPE, various HTML elements like <head>, <body>, <title>, <meta>, and how they contribute to the document's functionality and presentation. Additionally, it distinguishes between composite and self-closing tags, as well as the use of attributes to enhance element information.

Uploaded by

hanindaaa03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

HTML & JavaScript

The document provides an overview of HTML, detailing its structure, essential components, and the role of tags and attributes in creating web documents. It explains the significance of DOCTYPE, various HTML elements like <head>, <body>, <title>, <meta>, and how they contribute to the document's functionality and presentation. Additionally, it distinguishes between composite and self-closing tags, as well as the use of attributes to enhance element information.

Uploaded by

hanindaaa03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HTML

2.1 Creating Basic Documents


2.2 Decorating Documents
2.3 Listing Items
2.4 Drawing Tables
2.5 Distinguishing Specific Parts of a Document
2.6 Structuring Documents

HTML Document​
Consists of elements marked by tags and attributes of elements.

Initially, HTML documents were created using only elements with presentational attributes.

As web technologies advanced, the concept evolved to include documents that can change
dynamically and have the characteristics of applications.

Learning Content

●​ Essential document components and concepts needed to create an HTML document


●​ Elements for structuring and paragraphing documents
●​ Elements for creating lists and tables

HTML Document​
A collection of DOCTYPE and elements.

DOCTYPE​
Indicates the protocol used to structure the document.

<!DOCTYPE>​
Starts with <!DOCTYPE> to indicate the type of document.​
If a web document lacks DOCTYPE information, the web browser cannot accurately determine
the protocol used in the document, which may lead to improper rendering.​
<!DOCTYPE html>: HTML5 document protocol.

<html> Element​
Represents the content of the document.

●​ <head> element: Contains information about the document.


●​ <body> element: Contains the content of the document.

The document may include a collection of elements for representing various sizes of headings,
paragraphs, lists, and tables.
<head> Element

●​ <title> element: Represents the document title.


●​ <meta> element: Used for information other than the document title.
●​ Other elements: <link>, <script>, and <style> elements.

<title> Element​
Indicates the document title.

<meta> Element

●​ Character encoding information used in the web document.


●​ Search keywords for the document for search engines.

Other Elements

●​ <script> element: Script for interactions with users on a web document using
JavaScript.
●​ <style> element: CSS (Cascading Style Sheets) used for the presentation of the web
document.
●​ <link> element: Links to external JavaScript and CSS files referenced in the web
document.

Web Document: Consists of elements represented by tags.

Element

●​ Start tag to indicate the beginning


●​ Content of the element
●​ End tag
●​ Collection of attributes

Attribute​
Represents information about the element.​
Consists of pairs of names and values.

<div id=”my_id”> HTML </div>

Element type: <div id=”my_id”>, </div>

Attribute: id​
Value: my_id
Actual content: HTML

Tag​
A type of label added to document content to mark elements in the document.

Tag

●​ Start tag to indicate the beginning of an element: composed of the < character, the tag
name, and the > character.
●​ End tag to indicate the end of an element: composed of </, the tag name, and the >
character.
●​ Some elements are assumed to have an end tag even if it's not present.
●​ It's best to include the end tag when possible.
●​ Self-closing tag: composed of <, the tag name, and /> for elements that do not contain
other elements or content.

Composite Tag and Self-Closing Tag

●​ Composite Tag: Used for elements that have both a start tag and an end tag.
●​ Self-Closing Tag: A tag that indicates both the start and end, used for elements that do
not contain content.

Examples

●​ <title> element: A composite tag composed of a start tag <title> and an end tag
</title>.
●​ <img> element: A self-closing tag represented as <img/>.

Attribute​
Used to provide additional information to an element.

Additional Information

●​ Includes styles that define the appearance of an element.


●​ Some attributes are common to all elements, while others are specific to certain
elements.

Attribute

●​ Appears within the start tag of an element.


●​ Consists of a name and a value.
●​ An = character appears between the name and value, and the value is enclosed in either
double (" ") or single (' ') quotes.

An element can have multiple attributes, which are separated by spaces.

You might also like