Refer- https://www.w3schools.com/Html/html_intro.asp
Refer- https://developer.mozilla.org/en-US/docs/Web/CSS
Difference between HTML/CSS and Javascript.
-->HTML/CSS - Static pages - Content remains the same every time they are loaded unless manually updated.
-->Javascript - Dynamic pages - Pages can respond to user actions, such as clicking a button, submitting a form, or moving the mouse.
HTML Syntax:
<html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
-->Save the file with (.html) extension and double click to run the program.
HTML Element:
In HTML, elements are typically enclosed using an opening tag and a closing tag to define their start and end.
--> Opening Tag : Marks the beginning of an HTML element.
--> Closing Tag : Marks the end of an HTML element with forward slash before the element name.
Ex:
Hello, World!
Standalone tag: A standalone tag (also known as a self-closing tag) in HTML is an element that does not require a closing tag because it does not have any content between an opening and a closing tag.
Ex-
- break:used to insert a line break
Preparing ILUGC web page layout:(https://ilugc.in/)
<html> <head> <title>ILUGC</title> <style> .container{ border:1px solid; height:200%; width:85%; margin:auto; } .header h4{ text-transform: uppercase; color:#e22d30; border-top:1px solid green; width: fit-content; padding-top:10px; } .header{ margin:25px; } </style> </head> <body> <div> <p>Output:</p> <p><img src="https://img.php.cn/upload/article/000/000/000/173594590044719.jpg" alt="Day - TML/CSS - Project ILUGC(web page)"></p><p><strong>Explanation:</strong></p> <ol> <li> <html>: The root element of the HTML document.</li> <li> <head>: Contains metadata and resources for the document.</li> <li> <title>: Sets the title of the webpage displayed on the browser tab.</li> <li> <style>: Embeds CSS for styling the HTML document.</li> </ol>
.container: Styles the container div:
a) border: 1px solid;: Adds a 1-pixel solid border.
b) height: 200%;: Sets the height to twice the viewport height.
c) width: 85%;: Sets the width to 85% of the viewport width.
d) margin: auto;: Centers the container horizontally.
.header h4: Styles the
.header: Styles the header div:
a) margin: 25px;: Adds a margin of 25 pixels around the header.
Attribute:
An attribute provides additional information about an HTML element, usually in the form of name-value pairs.
Ex: `
Padding:
Padding is the space between the content of an element and its border. It creates an internal margin around the content, pushing the content away from the edges of the element.
Margin:
Margin is the space outside an element's border that separates it from other elements. It defines the external space between elements, creating distance around them.
class selector and an element selector:
The above is the detailed content of Day - TML/CSS - Project ILUGC(web page). For more information, please follow other related articles on the PHP Chinese website!