0% found this document useful (0 votes)
2 views

html (1)

The document explains how websites function, detailing the roles of HTML, CSS, and JavaScript in web development. It covers the structure of HTML, including heading tags, line breaks, horizontal lines, comments, and text formatting elements. The document emphasizes best practices for using HTML elements effectively in web design.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

html (1)

The document explains how websites function, detailing the roles of HTML, CSS, and JavaScript in web development. It covers the structure of HTML, including heading tags, line breaks, horizontal lines, comments, and text formatting elements. The document emphasizes best practices for using HTML elements effectively in web design.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Web Development

How Do websites actually work?


In order to access a webpage, we need a browser like chrome, firefox, safari etc. These
software (browsers) allows us to look up the IP Address of the website and we able to receive
data that it can be render into the website.
The data that we receive from the server usually consist of three types of files:- HTML, CSS and
JavaScript.

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.

What does HTML stands for?


HTML stands for HyperText Markup Language.

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.

➢ Code of All Headings Result

<h1>Heading Level 1</h1> Heading Level 1


<h2>Heading Level 2</h2> Heading Level 2
<h3>Heading Level 3</h3>
Heading Level 3
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5> Heading Level 4
<h6>Heading Level 6</h6> Heading Level 5
Heading Level 6

Note: -
• Browsers automatically add some white space (margin) before and after a
heading.
• Both the starting and ending tag are mandatory.

How to add some space between lines in HTML?


In order to add some space between lines we have to use an HTML element called a line break
(br).
• The HTML <br> element produces a line break in text.
• It is an empty element.
• Must have a start tag, and must not have an end tag (i.e. say closing tag).
Example:
Silicon Academy <br>
Ramnnath sharma marg <br> Gopalganj 841428

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.

How to create horizontal lines in HTML?


In HTML <hr> tag allows to create horizontal lines in HTML.
• It is an empty element.
• Must have a start tag, and must not have an end tag (i.e. say closing tag).

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 -->

How to add lines or paragraph in the webpage.


In order to add text in our website we have to use <p> </p> tag.
• The HTML <P> elements represents a paragraph of text.
• It contains both opening and closing tag.

HTML Text Formatting :-


Formatting elements were designed to display special types of text:-
• <b> - Bold Text
• <strong> - Important Text
• <i> - Italic text
• <em> - Emphasized
• <mark> - Marked Text
• <small> - Smaller Text
• <del> - Deleted Text
• <ins> - Inserted Text
• <sub> - Subscript Text
• <sup> - Superscript Text
HTML <b> and <strong> Elements
• The HTML <b> element defines bold text
Eg- <b> This is bold </b>
• The HTML <Strong> element defines text with strong importance, the content inside in is
typically displayed in bold.
Eg- <strong> Imp. text </strong>

HTML <i> and <em> Elements:-


• The HTML <i> element defines italic text
Eg: <i> This is italics </i>

• The HTML <em> element defines emphasized text. "The content inside is in italic
Eg. <em> This is emphasized </em>

HTML <small> Element:-


The HTML <small> element defines smaller text.
Eg: <small> This is small text </small>

HTML <mark> Element:-


The HTML <mark> element defines text that should be marked or highlighted.
Eg. <p> Do not forget to buy <mark> milk </mark> today </p>

HTML <del> Element:-


The HTML <del> element defines text that has been deleted from a document. Browser will
strike a line through deleted text.
Eg. <p> My favourite colour is <del> blue </del> red </p>

HTML <ins> Element


The HTML <ins> element defines a text that has been inserted that has been inserted into a
document. Browsers will usually in underline inserted text.
Eg- <p> My fav colour is <del>red </del> <ins> blue </ins>

HTML <sub> Element:-


The HTML <sub> element defines subscript text. Subscript text appears half a character below
the normal line and is sometimes rendered in a smaller font. Subscript text can be used for
formulas like H₂O.
Eg:- <p> This is <sub> subscripted</sub> text </p>

HTML <sup> Elements:-


The HTML <sup> element defines superscripted text. Superscript text appears half a character
above the normal line, and is sometimes rendered in a smaller font.
Superscript text can be used for footnotes, like www[1]
Eg:- <p> This is <sup> superscripted </sup> text </p>

You might also like