Introduction and examples of HTML
before we create an html file we must first prepare a local server or localhost, you can see the tutorial here
After the localhost server is ready, create a project1 folder in the htdocs folder and save the file below with the name index.html, for file naming avoid using spaces, it can also be replaced with a min sign (-) or undescore (_) so that the URL formed is neater .
<!DOCTYPE html> <html lang="en"> <head> <title>Belajar HTML #01</title> </head> <body> <p>Hello world!
</p> </body> </html>
for html file validation, you can test your html file at W3C to find out if the html file we created is correct or not.
after that you can test the file by opening a browser and typing http://localhost/project1/index.html and the result is like this
After successfully creating an HTML file, we will continue to know more about the parts of HTML, there are 3 important parts of HTML, namely: tags, elements and attributes.
A tag is a sign that starts and ends an element in HTML. Tags are made with square brackets (<…>) and then filled in the name of the tag and its attributes, for example: <p>, <h1>, <h2>, and so on.