0% found this document useful (0 votes)
14 views21 pages

HTML Basics: Formatting & Lists

Uploaded by

laxmiadapala1205
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)
14 views21 pages

HTML Basics: Formatting & Lists

Uploaded by

laxmiadapala1205
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

<!

--wRITE A HTML PROGRAM USING BASIC TEXT FORMATTING TAGS <hn>,<p>,<br>,<pre> -->

<html>

<title> TEXT FORMATTING TAGS </title>

<body>

<h1>THIS IS TAG H1</h1>

<h2>THIS IS TAG H2</h2>

<h3>THIS IS TAG H3</h3>

<h4>THIS IS TAG H4</h4>

<h5>THIS IS TAG H5</h5>

<h5>THIS IS TAG H6</h5>

<p>THE DIFFERENT PROGRAMMING LANGUAGES I STUDIED IN [Link],

<br> C, C++,JAVA</p>

<pre>

PRE TAG IS USED TO DISPLAY THE TEXT IN FIXED WIDTH FONT AND IT

PROTECTS THE LINE BREAKS AND SPACES

</pre>

</body>

</html>
<!--WRITE HTML PAGE FOR EXAMPLE CAFE USING ABOVE TEXT FORMATTING TAGS-->

<html>

<title> CAFE SITE</title>

<body>

<h1>IRANI CAFE</h1>

<h2>NEAR P.G COLLEGE</h2>

<h3>SECUNDERABAD</h3>

<h4>S.P ROAD</h4>

<h5>PARADISE METRO STATION</h5>

<h6> 500003 </h6>

<p> BRANCHES: <br> HYDERABAD <br> DELHI </p>

<pre>

THEY ARE MANY BRANCHES OF IRANI CAFES

IN HYDERABAD

</pre>

<h6> mail-id: abcde@[Link]</h6>

</body>

</html>
<!--WRITE A HTML PROGRAM USING PRESENTATIONAL ELEMENT TAGS <b>,<i>
<strike>,<sup>,<sub>,<big>,<small>,<hr>-->

<html>

<title> PRESENTATIONAL ELEMENT TAGS </title>

<body>

<p>

<b> I AM ..........</b>

<strike>STUDYING IN </strike>

<i> UNIVERSITY PG COLLEGE</i>

</p>

<p>

<b> CHEMICAL FORMULA OF WATER</b>

H<sub>2</sub><b>O</b>

</p>

<p> PG COLLEGE<sup> SECUNDERABAD </sup>

<hr>

<p>

<big> UNIVERSITY P.G COLLEGE SECUNDERAB </big>

</p>

<p>

<small> UNIVERSITY P.G COLLEGE SECUNDERABAD </small>

</p>

</body>

</html>
<!-- WRITE HTML PROGRAM USING DIFFERENT TAGS-->

<html>

<title> TYPES OF LISTS</title>

<body>

<h1>ORDERED LISTS<h1>

<ol>

<li> Ordered Lists </li>

<li> Unorderd List</li>

<li> Definition List</li>

</ol>

<h2> UNORDERED LIST </h2>

<ul>

<li> Ordered Lists </li>

<li> Unorderd List</li>

<li> Definition List</li>

</ul>

<h3> DEFINITION LIST <h3>

<dl>

<dt> ORDERED LISTS </dt>

<dd> Ordered lists display the text carrying large roman numbers, small roman numbers, capital letters
etc.</dd>

<dt> UNORDERED LIST </dt>

<dd> Unorderd list display certain text on the console , with each independent sentence being intilised
with a bullet mark</dd>

<dt> DEFINITION LISTS</dt>

<dd> DEFINITION LIST IS DIFFERENT FROM TWO LISTS</dd>

<dl>

</body>

</html>
<!--WRITE A HTML PAGE THAT DISPLAY IGREDIENTS AND INSTRUCTIONS TO PREPARE A RECIPE-->

<html>

<head>

<title> CHICKEN CURRY </title>

</head>

<body>

<h1> CHICKEN CURRY PREPARATION<h1>

<h2> INGREDIENTS: <h2>

<ul>

<li> 1 kilograms chicken </li>

<li>1/2 cup tomato puree </li>

<li>1 tablespoon garlic paste</li>

<li>1 cinnamon stick</li>

<li>1 bay leaf</li>

<li>1 tablespoon garam masala powder</li>

<li>1 tablespoon kasoori methi powder</li>

<li>2 1/2 cup water</li>

<li>2 onion</li>

<li>1 tablespoon ginger paste</li>

<li>1 cup cashews </li>

<li>1 teaspoon cumin seeds</li>

<li>1 tablespoon coriander powder</li>

<li>2 tablespoon vegetable oil</li>

<li>salt as required</li>

<li>1 teaspoon turmeric</li>

<li>1/3 cup lemon juice</li>

</ul>
<h2> INSTRUCTIONS: </h2>

<ol>

<li>Firstly, wash the chicken under running water and keep it aside. Now,

take a non-stick pan and pour little oil in it. Then add whole spices - cumin seeds,

cinnamon seeds and bay leaf. Let them cook until the seeds start to crackle.</li>

<li>On the other hand, marinate the chicken with salt, turmeric powder and lemon

juice and keep it aside for 20-30 minutes. Now, using a grinder, grind onion and

1 cup of water to make a puree of thick consistency and put aside till required.

Wash the grinder and put cashews in it and add 1 cup of water. Make a paste of cashews

of smooth consistency. Again, wash the grinder and grind red chillies with 1/2 cup of

water to form a paste of thick consistency.</li>

<li>Next, take a saucepan and add onion puree with ginger and garlic paste into it and cook

it for 2 minutes. Add tomato puree to the pan and cook for another 2 minutes. Meanwhile,

add salt to taste and red chilli paste, and cover the pan with a lid.</li>

<li>Then add the marinated chicken pieces in the gravy and let it cook for more

15-20 minutes with the lid on the pan, after 15-20 minutes check if the chicken

pieces are cooked properly. Now, add cashews and red chilli paste into the mixture

and cook for another 2 minutes.</li>

<li>Now add garam masala, coriander powder, cashew nut paste and kasuri methi and mix

them all well. Let the chicken curry cook for another 5 minutes and then turn off the flame.

Garnish the curry with fresh coriander leaves and serve hot with steamed rice or paratha.</li>

</ol>

</body>

</html>
<!-- WRITE A PROGRAM USING GROUPING ELEMENTS <div and <span> -->

<html>

<title> GROUPING ELEMENTS </title>

<body<

<div>

<p> WELCOME TO <i> <span style ="color:blue;">

UNIVERSITY PG COLLEGE OU SECUNDERABAD </span></i> group</p>

<p> CONTACT US AT:<b> <span style="color:green;">

oupgcs@[Link]</span></b></p>

</div>

</body>

</html>
<!-- WRITE HTML MENU PAGE FOR EXAMPLE CAFE SITE-->

<html>

<head>

<title> MENU PAGE FOR A CAFE </TITLE>

</head>

<body>

<h1>IRANI CAFE, HYDERABAD</h1>

<ul>

<li>TEA</li>

<li>COFFEE</li>

<li>GREEN TEA</li>

</ul>

<h2> BAKERY <H2>

<UL>

<li>ICE CREAMS</li>

<li>COOL DRINKS</li>

<li>CAKES</li>

</ul>

</body>

</html>
<!-- WRITE A HTML PROGRAM TO CREATE TIME TABLE -->

<html>

<head> TIME TABLE </title>

<body>

<h1> TIME TABLE <h1>

<table border="2" cellspacing="3" align="center">

<th>

<td> 9:00 - 10:00

<td> 10:00 - 11:00

<td> 11:00 - 12:00

<td> 12:00 - 1:00

<td> 01:00 - 1:30

<td> 1:30 - 2:30

<td> 2:30 - 3:30

<td> 3:30 - 4:30

</th>

<tr>

<td align="center"> MONDAY

<td align="center" colspan="3">B1 PHYSICS4/B2 CS3</td>

<td align="center"> PHYSICS <td align="center"><br>

<td align="center" colspan="3">B1/B2/B3 MATHS</td>

</tr>

<tr>

<td align="center"> TUESDAY


<td align="center"> MATHS <td align="center">PHYSICS<br>

<td align="center"> COMPUTERS3 <td align="center">MATHS<br>

<td align="center"> L <td align="center" colspan="3">B2 PHYSICS4</td>

</tr>

<tr>

<td align="center"> WEDNESDAY

<td align="center"> MATHS <td align="center">COMPUTERS4<br>

<td align="center"> PHYSICS <td align="center">MATHS<br>

<td align="center"> U <td align="center" colspan="3">B2 PHYSICS3/B1 COMPUTERS3</td>

</tr>

<tr>

<td align="center"> THURSDAY

<td align="center" colspan="3">B2 COMPUTER4/B1 PHYSICS3</td>

<td align="center"> PHYSICS <td align="center">N<br>

<td align="center" colspan="3">B1 COMPUTERS4</td>

</tr>

<tr>

<td align="center"> FRIDAY

<td align="center"> COMPUTERS3 <td align="center">MATHS<br>

<td align="center"> PHYSICS <td align="center">COMPUTERS4<br>

<td align="center"> C <td align="center" colspan="3">B1/B2/B3 MATHS</td>

</tr>

<tr>

<td align="center"> SATURDAY

<td align="center"> COMPUTERS4 <td align="center">PHYSICS<br>

<td align="center"> COMPUTERS3 <td align="center">MATHS<br>


<td align="center"> H <td align="center"> SEC 3/4 <td align="center">GE<br>

</tr>

<body>

</html>
<!-- WRITE A HTML PROGRAM TO CREATE A FRAME AND LINKS BETWEEN FRAMES -->

[Link]

<html>

<head>

<title> MASTER PAGE </title>

</head>

<frameset cols="50%,50%">

<frame src="[Link]">

<frame src="[Link]">

</frameset>

</html>

[Link]

<html>

<head>

<title> PAGE1 </title>

</head>

<body>

WELCOME TO PAGE1

<br>

click here <a href="[Link]"> to link to page3 </a>

</body>

</html>
[Link]

<html>

<head>

<title> PAGE2 </title>

</head>

<body>

WELCOME TO PAGE2

</body>

</html>

[Link]

<html>

<head>

<title> PAGE3 </title>

</head>

<body>

WELCOME TO PAGE3

</body>

</html>

Common questions

Powered by AI

The HTML recipe page instructions ensure culinary accuracy and user-friendliness by employing ordered lists to present steps sequentially, thereby limiting room for procedural errors. Each instruction is clear and specific, using precise measurements and actionable commands ('marinate,' 'grind,' 'cook'), ensuring users follow an accurate process. The structure facilitates understanding of the chronological flow needed for preparation, minimizing confusion. Furthermore, by clearly segmenting ingredients and instructions, users can efficiently switch between preparation and cooking, fostering a smooth cooking experience .

The HTML documentation handles creating a timetable by utilizing the <table> element, which is crucial for organizing data in a tabular format. Key elements include <th> for table headers that describe the structure of the timetable, <tr> for table rows indicating each time slot or day, and <td> for table data representing specific classes or activities. Attributes such as border, cellspacing, and align refine the display and alignment of the table, making the timetable clear and easy to interpret .

HTML list tags <ul> (unordered lists) and <ol> (ordered lists) are effective in organizing recipes by clearly delineating ingredients and procedural steps. The <ul> tag can be used to list ingredients as it provides a straightforward itemization without needing an order, while the <ol> tag is best suited for instructions, as it inherently indicates sequence through numbering, guiding users step-by-step through the preparation process .

The <h1> to <h6> heading tags are crucial for the semantic structure of HTML documents, providing a way to convey hierarchy and importance among sections. This hierarchy aids in both search engine optimization and web accessibility by allowing screen readers to navigate through content, recognizing the structure and importance of information presented. These headings enable users with disabilities to better understand page content, as they can quickly parse and skip to desired content or sections. By offering a semantic structure, these tags ensure the document is not only visually structured but also semantically meaningful, improving user experience for all users .

The <div> and <span> tags are both used for grouping HTML elements, but they serve different purposes and affect page layout differently. A <div> tag is a block-level element, which means it structures content into distinct sections and typically spans the full width available, causing a line break before and after. It is commonly used for larger divisions of content. A <span> tag, on the other hand, is an inline element used for styling a certain portion of text within a block-level or inline element without affecting the overall layout, retaining the flow of surrounding text. These properties allow <div> for broader layout control and <span> for targeted styling, adding flexibility to page design without altering structural elements .

HTML presentational tags such as <b> for bold, <i> for italics, <sup> and <sub> for superscript and subscript, and <strike> for strikethrough, are used to change the visual style of content inline, without altering its semantic structure. These tags apply specific styling to text, making certain data stand out or appear in a specified typographical style. While they alter the visual presentation, they do not contribute to creating or identifying semantic meaning within the document structure; instead, they help enhance textual emphasis and readability in a manner that does not interfere with the document's overall semantic organization .

HTML presentation tags, such as <b> for bold and <i> for italics, offer quick and straightforward methods to apply styles directly within the HTML code without the need for external or internal stylesheets. This can be advantageous for simplicity and immediacy when small styling adjustments are needed, making them ideal for quick prototyping or educational purposes. However, they lack the flexibility and power of CSS, which provides extensive styling options, reusability, and separation of content from presentation, which are best practices for maintainability and scalability in modern web development .

HTML text formatting tags such as <h1> to <h6>, <p>, <pre>, and <br> create a hierarchical structure that enhances readability by allowing content to be segmented logically. Heading tags signify importance and provide a clear visual cue for different sections of a document, while <p> tags define paragraphs, and <br> is used for line breaks. The <pre> tag maintains whitespace and line breaks, which can be useful for displaying pre-formatted text. Together, these tags make the content easier to navigate and understand by visually distinguishing different types of information .

It is recommended to use CSS over HTML presentational tags in modern web design because CSS offers greater flexibility, control, and separation of content and presentation. This separation allows styles to be applied consistently across multiple pages and altered without changing the HTML structure, improving maintainability and scalability. CSS supports a wide array of styling options beyond simple typography adjustments, enabling responsive and adaptive design across devices. HTML presentational tags, while simple, can clutter the HTML document and do not conform to best practices for code maintainability and accessibility .

Frames in HTML, as shown in the document example, allow developers to display multiple HTML documents within a single browser window using the <frameset> and <frame> tags. The advantages of frames include the ability to divide a webpage into reusable sections, making navigation and layout design flexible, and reducing server load by minimizing content reloading. However, limitations include significant accessibility issues, as frames can make navigation for users with disabilities challenging. It can also complicate linking to specific parts of a page, disrupt the back button's usual functionality, and be undefined for search engine indexing, impacting SEO negatively .

You might also like