Answer the following questions with your group:
- How do you link a JavaScript file to an HTML document?
- How do you link a CSS file to an HTML document?
- What are the roles of HTML, CSS, and JavaScript on a webpage?
- What is the DOM? How is it related to HTML, CSS, and JavaScript?
- How does HTML get rendered into DOM?
- What are elements?
- What are attributes in HTML?
- How can we interact with HTML?
Team [ Ibrahim Muhaned - Nada Al-Shakiry - Rawan Mustafa - Vinos Sarhad ]
- How do you link a JavaScript file to an HTML document?
With Script tag in the end of the body or on the head.
- How do you link a CSS file to an HTML document?
link tag in the head.
- What are the roles of HTML, CSS, and JavaScript on a webpage?
HTML is the structure of the web.
CSS is responsable of the appearance.
JS for functionality.
- What is the DOM? How is it related to HTML, CSS, and JavaScript?
The Document Object Model (DOM) is a programming interface that represents the structure of web documents as a tree of objects. It allows scripting languages like JavaScript to access and manipulate the content, structure, and style of web pages dynamically. Developers can use the DOM to access and modify elements, handle events, manipulate styles, and create interactive web applications without needing to reload the entire page.
- How does HTML get rendered into DOM?
When a web browser loads an HTML document, it reads the markup, breaks it down into elements, and constructs a tree-like structure called the Document Object Model (DOM). This DOM tree represents the structure of the HTML document. Each element in the HTML becomes a node in the DOM tree, with parent-child relationships reflecting the HTML hierarchy. The browser then renders the content based on the DOM structure and associated CSS styles, displaying the web page to the user.
- What are elements?
Elements in HTML are fundamental components that define the structure and content of web pages. They are enclosed in angle brackets and consist of a start tag, content, and an optional end tag. Elements can nest within each other, forming a hierarchical structure. They may have attributes that provide additional information or specify behavior. Overall, elements play a crucial role in organizing and presenting content on web pages.
- What are attributes in HTML?
HTML attributes provide additional information about HTML elements.
- How can we interact with HTML?
Using JavaScript, you can interact with the HTML DOM to dynamically modify the content and behavior of an HTML page. This allows you to create interactive web applications, implement dynamic user interfaces, and perform various operations on the document based on user actions or programmatic logic.