简体   繁体   中英

Opening HTML file in web browser in Eclipse

When I right-click on my html doc and select open with web browser , the browser opens, but shows no content. My other HTML docs in other projects work just fine, but for some reason, this will not display anything. Any suggestions?

HTML文档

Your page doesn't actually have any content , hence why you are not seeing any. HTML written in the <head> section is not rendered on the page, but rather is used to load external files and hold metadata. The <body> section is what gets written to the page itself:

 <html> <head> <title>Not visible</title> </head> <body> Visible! </body> </html> 

The <title> element simply sets the name that is shown in the tab . If you want to create a title on the page itself, you're probably looking to create an <h1> element (as you've already created some styling for such an element).

Hope this helps! :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM