html (1)
html (1)
HTML File: - The HTML code file is responsible for the structure of our website.
For example: - If a website was a house, then the HTML would build the walls.
➢ Basically, HTML build up the structure of our website.
CSS File: - CSS files are responsible for styling our websites.
For example: - If we were building a house, then CSS would be the painters and decorators.
JavaScript File: - JavaScript code file is the code that allows our website to actually do things or
have behaviour.
For example: - If we were building a house, then JavaScript is the electrician who would be able
to connect the wires. So, all the appliances, equipment could work.
HTML
HTML is the foundation of the website. Thus, we couldn’t create website just by using CSS or
JavaScript file, but we can create a website just by using HTML file.
Working of HTML
How to make the headings in the website?
We can make the headings in the website by using
<h1>Heading</h1> Largest Heading
<h2>Heading</h2>
<h3>Heading</h3>
<h4>Heading</h4>
<h5>Heading</h5>
<h6>Heading</h6> Smallest Heading
Note: - The heading tags get smaller as the number goes up.
Starting tag Content Ending tag
<h1>Heading</h1>
<h6>Heading</h6>
Headings in HTML: -
The HTML <h1> - <h6> elements represent six level of section headings.
• Heading Information can be used by user agents to construct a table of consists for a
document automatically.
• Avoid using heading elements to resize text. Instead, use the CSS font-size property.
• Avoid skipping heading levels: always start from <h1> followed by <h2> and so on.
• Use only one <h1> per page or view. It should concisely describe the overall purpose of
the content.
• Using more than one <h1> will not result in an error, but is not considered a good
practice.
Note: -
• Browsers automatically add some white space (margin) before and after a
heading.
• Both the starting and ending tag are mandatory.
Result:
Silicon Academy
Ramnnath sharma marg
Gopalganj 841428
Notes: Do not use <br> to create margins between paragraphs, wrap them in <p> element and
use the CSS margin property to control their size.
Comments in HTML:-
HTML comments are not displayed in the browser, but they can help document our HTML.
We can add comments to our HTML code by using:-
<!—write your comments here -->
• The HTML <em> element defines emphasized text. "The content inside is in italic
Eg. <em> This is emphasized </em>