Win a copy of liveProject: Build an ML Recommender System this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

html 5 and CSS - please check the coding for me

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Computers</title>
<style>
body{
background-color:lightyellow;
}
h1{
text-align: center;
}
</style>
</head>
<body>
<a href="computer drives.html"> computer drives</a>
<h1>Types of Computers</h1>
<p>A computer s a programmable device that stores , retrieves and processes data. Today's
computer a electronic devices that accept data (input), process that data , produce
output and store the results. When talking about a computer or a "PC", you are usually referring  
to a desktop computer found in a home or office. Below are all the different examples of what is
considered a computer today. Many computers can store and retrieve informaton using hard drives.
Computers can be connected together to form networks, allowing connected computers to communcate
with each other.</p>

<h2> Advantages of Computers</h2>
<ul>
<li> Multitasking</li>
<li>Speed</li>
<li>Cost/Stores huge amount of data</li>
<li>Accuracy</li>
<li>Data security</li>
</ul>

<p> Now computer is not just a calculating device. Now a day's computer has very important role
in human life. One of the main advantages of computer is its incredible speed, which helps human to
complete their task in few seconds. All the operations can be performed very fast just because
of ts speed else wise it takes a long time to perform the task. Multitasking is one of the major advantage of computer. A person can perform multiple task,
multiple operation, calculate numerical problems within few seconds. Computer can perform trillion
of instructions per second. One of the root advantages of computer is that can perform not only
calculation but also with accuracy. Also computers provide security from destructive forces and
from unwanted action from unauthorized users like cyber attack or access attack.</p>
<h2> Disadvantages of Computers</h2>
<ul>
<li>Virus and hacking attacks</li>
<li>Online Cyber Crimes </li>
<li>Reduction in employment opportunity </li>
</ul>

<img src="computers.jpg" alt="Computer" style="width:850px;height:305px;">

<h2> Desktop Computers</h2>
<p> A desktop compute is a personal computer that fits on or under a desk. It has a
   monitor or another display,keyboard,mouse and either a horizontal or vertical form
   factor. Unlike laptop, whch is portable, a desktop computer is meant to stay at one
   location.</p>
<img src="desktop_computer.jpg" alt="PC" style="width:850px;height:305px;">
<h2>Laptops</h2>
<p> A laptop s also known as portable computers.It is a computer which is easy to carry around and
   the user can fold the laptop along its hinge for carrying. The laptop was created mainly for this
   particular reason. Computer parts were scaled to smaller size so this could happen. A modern
   laptop is self-contained,with built-in rechargeable battery and peripheral equipment.
  The user can also plug it in,for longer battery life and additional peripherals.</p>
<img src="laptop.jpg" alt="portable" style="width:650px;height:305px;">
<h3> Laptops have advantages such as:</h3>
<ul>
<li>People can carry them anywhere, whether office or home.</li>
<li>They can be used in a smaller space than a desk computer.</li>
</ul>

<h3> Disadvantages of portable computers include:</h3>
<ul>
<li>Price is higher</li>
<li>Easily stolen</li>
<li>They can be used in a car, resulting in distracted driving</li>
<li>They travel frequently, thus can be damaged, and repairs are more difficult</li>
</ul>
</body>
</html>

The above coding contains html and CSS coding.
can you please check the above coding and tell me if there is any mistake or if  everything is correct?
 
Marshal
Posts: 3507
496
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you have that much markup, I would recommend using an online validator such as https://validator.w3.org/ or https://www.freeformatter.com/html-validator.html to check your HTML document and highlight any errors or concerns.
 
Sheriff
Posts: 67532
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also please UseCodeTags when posting code. More people will inspect your code when it is easier to read.
 
debs mahap
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Also please UseCodeTags when posting code. More people will inspect your code when it is easier to read.






please check this now and let me know if everything is correct or if there is something wrong ?
 
Ron McLeod
Marshal
Posts: 3507
496
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

debs mahap wrote:please check this now and let me know if everything is correct or if there is something wrong ?


Have you try checking your document with an online tool like I suggested?  Was there anything in the results that was unclear and you could use some help to understand?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code looks quite decent to me.
I would recommend to use an external style sheet instead of styling internal (style tag in head) and inline (style attribute on elements, for instance line 50).
Visit w3schools to find out how to add an external stylesheet in HTML this is also a great resource to find other things about HTML5 and CSS3.
Also spaces in filenames can be unsafe, these spaces arent allowed in an URL because they are unsafe characters.
See the accepted answer here for more information.
There is however a mechanism to allow these unsafe characters in an URl this is called URL encoding these spaces are then encoded in the URL with %20.
All unsafe characters begin with a % sign followed by the heximal code from that character in the ASCII table, abbreviation hx on that site.
In brief, spaces are allowed in URLs but are unsafe and should be avoided.
You can find out which filenames contains these unsafe spaces by using a validator as mentioned above, this also generates a warning which is worth to solve.
Finally im not quite sure if the quotes around PC in line 19 are allowed, these are after all reserved characters in HTML, it's probably better to use HTML entities for that.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic