Can anyone please help I am stuck on the tribute page with a few requirements

Tell us what’s happening:
It won’t let me pass the test in which (Your #img-div , #image , #img-caption , #tribute-info , and #tribute-link should all be descendants of #main) even though they are all under main. It also won’t let me center my image no matter how many ways I try to. When I add a display of block to my image in CSS it won’t allow me to pass the test in which the max-width is 100% even though it’s in my CSS code.

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

<!Doctype>
 <html id="html">
  <main id="main">
   <head>
     <h1 id="title"> Sundar Pichai </h1>
     </head>
<main id="main">
     <div id="img-div">           <img id="image" src="https://www.gettyimages.indetailnews-photochief-executive-officer-of-google-inc-sundar-pichai-is-news-photo" ><div id="img-caption">Photo of Alphabet and Google CEO Sundar Pichai</div></div>
<body id="tribute-info">
  <h2 id="h2">Background</h2>
   <p id="p1"> Pichai Sundararajan, who was born June 10, 1972, also called Sundar Pichai, is an Indian American business executive. He is an engineer and the chief executive officer (CEO) of Google LLC. He used to be the Product Chief of Google. Pichai’s current position was announced on August 10, 2015, as part of the restructuring process that made Alphabet Inc. into Google’s parent company.</p>
  <h3 id="h3"> Early life </h3>
   <p id="p2">Pichai was born in Madurai, Tamil Nadu, India. His mother Lakshmi was a stenographer and his father, Regunatha Pichai was an electrical engineer at GEC, the British conglomerate. Pichai grew up in a two-room apartment in Ashok Nagar, Chennai.

Pichai graduated from the Jawahar Vidyalay school, a Central Board of Secondary Education school in Ashok Nagar, Chennai and completed the Class XII from Vana Vani school in the Indian Institute of Technology Madras.

Subsequently, he received a degree from Indian Institute of Technology Kharagpur in metallurgical engineering and is a notable alumnus of that institution. He also has an M.S. from Stanford University in material sciences and engineering, and an MBA from the Wharton School of the University of Pennsylvania, where he became a Siebel Scholar and a Palmer Scholar.</p>
 <h4 id="h4">Carear</h4>
 <p id="p3">Pichai worked in engineering and product management at Applied Materials and in management consulting at McKinsey & Company. Pichai got a job at Google in 2004, where he managed the product management and innovation efforts for a suite of Google’s client software products, including Google Chrome and Chrome OS.

He then went on to supervise the development of other applications such as Gmail and Google Maps. On November 19, 2009, Pichai gave a presentation of Chrome OS; the Chromebook was issued for trial and testing in 2011, and released to the public in 2012. On May 20, 2010, he declared the open-sourcing of the new video codec VP8 by Google and launched the new video format, WebM.

On March 13, 2013, Pichai annexed Android to the list of Google products that he manages. Android was formerly managed by Andy Rubin. He was a director of Jive Software from April 2011 to July 30, 2013. Pichai was chosen to become the next CEO of Google on August 10, 2015 after previously being appointed Product Chief by CEO, Larry Page. On October 24, 2015 he moved into the new position at the completion of the formation of Alphabet Inc., the new holding company for the Google company family.

Pichai had been submitted as a contender for Microsoft’s CEO in 2014.

In August 2017, Pichai got a lot of publicity firing a Google employee who wrote a ten-page manifesto criticizing the company’s diversity policies and explaining that “distribution of preferences and abilities of men and women differ in part due to biological causes and … these differences may explain why we don’t see equal representation of women in tech and leadership”. While noting that the manifesto raised a number of issues that are open to debate, Pichai said in a memo to Google employees that “to suggest a group of our colleagues have traits that make them less biologically suited to that work is offensive and not OK”.

In December 2017, Pichai was a speaker at the World Internet Conference in China, where he declared that “a lot of work Google does is to help Chinese companies. There are many small and medium-sized businesses in China who take advantage of Google to get their products to many other countries outside of China.”

Sundar Pichai appeared before Congress in late 2018 to answer questions related to a number of controversies at the time. Employees had been in open revolt over the company’s handling of sexual misconduct allegations, lawmakers had threatened Google with regulations, and company leadership was undecided about bringing censored search engines to China.</p>
<h5 id="h5"> Major works</h5>
 <p id="p4">Pichai is best known as the mastermind behind the launch of the Chrome browser in 2008. He played a pivotal role in convincing his seniors at Google to launch the browser which in time became the most popular browser on the internet and also led to the launch of the Chrome operating system.

If you want to read more about this amazing person click                <a id="tribute-link" target="_blank" href="https://en.wikipedia.org/wiki/Sundar_Pichai"> Here </a>
 </p>
 <main id="main">
 
</body>
</main>
</html>

<style>
#image{
  max-width:100%;
    display: block;
  margin-left: auto;
  margin-right: auto;
}
</style>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Build a Tribute Page

Link to the challenge:

please validate your code with an html validator like this https://validator.w3.org/, you have syntax errors that need fixing

Thank you, I fixed all the syntax errors and it turns out I just needed to have a Doctype html for my style to be applied, again thank you very much.