今天,我建立了一个网站
将过去 5 天积累的知识整合在一起,我构建了一个实用的食谱书籍网站,并使用 CSS 进行样式设计。
链接到网站 - Ofameh_Recipe_Site
HTML 代码块:
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Recipe Book</title> <link rel="stylesheet" href="styles.css"> <header> <h1 id="Ofameh-s-Recipe-Book">Ofameh's Recipe Book</h1> </header> <nav> <ul> <li> <button onclick="location.href='#breakfast';">Breakfast</button> </li> <li> <button onclick="location.href='#lunch';">Lunch</button> </li> <li> <button onclick="location.href='#dinner';">Dinner</button> </li> <li> <button onclick="location.href='#breakfast';">Dessert</button> </li> <li> <button onclick="location.href='#contact';">Contact</button> </li> </ul> </nav> <main> <section id="breakfast"> <h2 id="Breakfast-Recipes">Breakfast Recipes</h2> <article> <h3 id="日-HTML">日 HTML</h3> <img src="/static/imghwm/default1.png" data-src="./images/pancake.jpg" class="lazy" alt="日 HTML"> <h4 id="Ingredients">Ingredients:</h4> <ul> <li>2 cups all-purpose flour</li> <li>2 tablespoons sugar</li> <li>2 teaspoons baking powder</li> <li>1 teaspoon baking soda</li> <li>1/2 teaspoon salt</li> <li>2 cups buttermilk</li> <li>2 large eggs</li> <li>1/4 cup melted butter</li> </ul> <h4 id="Instructions">Instructions:</h4> <ol> <li>In a bowl, mix the dry ingredients together.</li> <li>In another bowl, whisk the wet ingredients together.</li> <li>Combine the dry and wet ingredients and mix until smooth.</li> <li>Heat a griddle over medium heat and grease it lightly.</li> <li> Pour batter onto the griddle and cook until bubbles form on the surface. </li> <li>Flip and cook until golden brown on the other side.</li> </ol> </article> </section> <section id="lunch"> <h2 id="Lunch-Recipes">Lunch Recipes</h2> <article> <h3 id="Grilled-Cheese-Sandwich">Grilled Cheese Sandwich</h3> <img src="/static/imghwm/default1.png" data-src="./images/grilled_cheese.jpg" class="lazy" alt="Grilled Cheese Sandwich"> <h4 id="Ingredients">Ingredients:</h4> <ul> <li>2 slices of bread</li> <li>2 slices of cheese</li> <li>Butter</li> </ul> <h4 id="Instructions">Instructions:</h4> <ol> <li>Butter one side of each slice of bread.</li> <li> Place one slice of bread, buttered side down, on a skillet over medium heat. </li> <li> Top with cheese and the other slice of bread, buttered side up. </li> <li> Cook until the bread is golden brown and the cheese is melted, flipping once. </li> </ol> </article> </section> <section id="dinner"> <h2 id="Dinner-Recipes">Dinner Recipes</h2> <article> <h3 id="Spaghetti-Bolognese">Spaghetti Bolognese</h3> <img src="/static/imghwm/default1.png" data-src="/images/spaghetti_bolognesse.webp" class="lazy" alt="Spaghetti Bolognese"> <h4 id="Ingredients">Ingredients:</h4> <ul> <li>200g spaghetti</li> <li>2 tablespoons olive oil</li> <li>1 onion, chopped</li> <li>2 garlic cloves, minced</li> <li>400g ground beef</li> <li>1 can of tomatoes</li> <li>2 tablespoons tomato paste</li> <li>1 teaspoon dried oregano</li> <li>Salt and pepper to taste</li> </ul> <h4 id="Instructions">Instructions:</h4> <ol> <li>Cook the spaghetti according to package instructions.</li> <li> Heat olive oil in a pan and sauté the onion and garlic until softened. </li> <li>Add the ground beef and cook until browned.</li> <li> Stir in the tomatoes, tomato paste, and oregano. Simmer for 20 minutes. </li> <li>Season with salt and pepper.</li> <li>Serve the sauce over the spaghetti.</li> </ol> </article> </section> <section id="dessert"> <h2 id="Dessert-Recipes">Dessert Recipes</h2> <article> <h3 id="Chocolate-Cake">Chocolate Cake</h3> <img src="/static/imghwm/default1.png" data-src="./images/chocolate_cake.jpg" class="lazy" alt="Chocolate Cake"> <h4 id="Ingredients">Ingredients:</h4> <ul> <li>1 and 3/4 cups all-purpose flour</li> <li>1 and 1/2 cups sugar</li> <li>3/4 cup cocoa powder</li> <li>1 and 1/2 teaspoons baking powder</li> <li>1 and 1/2 teaspoons baking soda</li> <li>1 teaspoon salt</li> <li>2 large eggs</li> <li>1 cup milk</li> <li>1/2 cup vegetable oil</li> <li>2 teaspoons vanilla extract</li> <li>1 cup boiling water</li> </ul> <h4 id="Instructions">Instructions:</h4> <ol> <li>Preheat your oven to 350°F (175°C) and grease a cake pan.</li> <li>In a large bowl, combine the dry ingredients.</li> <li> Add the eggs, milk, oil, and vanilla, and beat on medium speed for 2 minutes. </li> <li>Stir in the boiling water (batter will be thin).</li> <li>Pour the batter into the prepared pan.</li> <li> Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean. </li> </ol> </article> </section> <section id="contact"> <h2 id="Contact-Us"> Contact Us </h2> <article> <b> Want More Recipes </b> <br> <label for="subscribe"> Subscribe to our newsletter </label> <input type="checkbox" id="subscribe" name="subscribe"> <br> <br> Shoot us an email: <a href="mailto:osowoofameh@gmail.com" target="_blank"> <button> Email </button> </a> <br> <br> Catch Us on X: <a href="https://x.com/trader_mkk" target="_blank"> <button> Twitter </button></a> <br> </article> </section> </main> <footer> <p> <b> © 2024 Ofameh <br> All rights reserved.</b> </p> </footer>
CSS 代码块-
body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 0; } header, main, footer { padding: 20px; margin: 10px; } header { background-color: black; color: white; text-align: center; } nav ul { list-style-type: none; padding: 0; display: flex; justify-content: space-around; } nav ul li { margin: 0 10px; } section { margin-bottom: 20px; } article { border: 1px solid #ccc; padding: 10px; margin: 10px 0; } img { max-width: 100%; height: auto; } footer { background-color: #333; color: white; text-align: center; padding: 10px 0; } button { display: inline-block; padding: 10px 20px; font-size: 16px; color: black; border: none; border-radius: 5px; text-align: center; text-decoration: none; cursor: pointer; background-color: #ccc; transition: background-color 0.3s ease, transform 0.3s ease; } button:hover { background-color: black; transform: translateY(-2px); color: white; }
将第五天到目前为止我所学到的所有知识整合在一起来构建这个对我来说是很有成就感的,因为这个练习的重点是基于项目的学习。
所以实际上这样做了 5 天并能够建立一个如此好的网站对我来说意义重大
话虽这么说,第 6 天到第 10 天将展示我所谓的网站,每天我都会构建一个网站,该网站将逐渐变得更加困难和复杂。
就在那里!
以上是日 HTML的详细内容。更多信息请关注PHP中文网其他相关文章!

JavaScript在现实世界中的应用包括服务器端编程、移动应用开发和物联网控制:1.通过Node.js实现服务器端编程,适用于高并发请求处理。2.通过ReactNative进行移动应用开发,支持跨平台部署。3.通过Johnny-Five库用于物联网设备控制,适用于硬件交互。

我使用您的日常技术工具构建了功能性的多租户SaaS应用程序(一个Edtech应用程序),您可以做同样的事情。 首先,什么是多租户SaaS应用程序? 多租户SaaS应用程序可让您从唱歌中为多个客户提供服务

本文展示了与许可证确保的后端的前端集成,并使用Next.js构建功能性Edtech SaaS应用程序。 前端获取用户权限以控制UI的可见性并确保API要求遵守角色库

JavaScript是现代Web开发的核心语言,因其多样性和灵活性而广泛应用。1)前端开发:通过DOM操作和现代框架(如React、Vue.js、Angular)构建动态网页和单页面应用。2)服务器端开发:Node.js利用非阻塞I/O模型处理高并发和实时应用。3)移动和桌面应用开发:通过ReactNative和Electron实现跨平台开发,提高开发效率。

JavaScript的最新趋势包括TypeScript的崛起、现代框架和库的流行以及WebAssembly的应用。未来前景涵盖更强大的类型系统、服务器端JavaScript的发展、人工智能和机器学习的扩展以及物联网和边缘计算的潜力。

JavaScript是现代Web开发的基石,它的主要功能包括事件驱动编程、动态内容生成和异步编程。1)事件驱动编程允许网页根据用户操作动态变化。2)动态内容生成使得页面内容可以根据条件调整。3)异步编程确保用户界面不被阻塞。JavaScript广泛应用于网页交互、单页面应用和服务器端开发,极大地提升了用户体验和跨平台开发的灵活性。

Python更适合数据科学和机器学习,JavaScript更适合前端和全栈开发。 1.Python以简洁语法和丰富库生态着称,适用于数据分析和Web开发。 2.JavaScript是前端开发核心,Node.js支持服务器端编程,适用于全栈开发。

JavaScript不需要安装,因为它已内置于现代浏览器中。你只需文本编辑器和浏览器即可开始使用。1)在浏览器环境中,通过标签嵌入HTML文件中运行。2)在Node.js环境中,下载并安装Node.js后,通过命令行运行JavaScript文件。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

Dreamweaver CS6
视觉化网页开发工具

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

SublimeText3 Linux新版
SublimeText3 Linux最新版