HTML gives a web page its structure. It marks where elements such as headings, paragraphs, images, links, and tables begin and end so a browser can display them. You can add HTML to a WordPress page without writing an entire website from scratch. section 7.2.1 section 7.2.2 section 1.5.14
Start by recognizing a few useful tags:
- A heading such as <h1>MAJOR HEADLINE</h1> has a start tag, content, and an end tag. Browsers supply a default appearance, which CSS can change. section 7.2.1
- <p> marks a paragraph; <h1> through <h6> organize headings; <table> marks a table. section 7.2.2
- <a> creates a link, while <img> places an image. A link can also wrap a button or image to make it clickable. section 7.2.2 section 3.5.3
Make a table for a WordPress page
Ask an AI assistant: “List the five largest lakes in the US. Present the results in an HTML table.” Copy the generated code into the Text tab of the WordPress Edit Page screen, then switch to the Visual tab to check the result. Want a different look? Ask for black column headings with white, all-caps lettering, then check the revised table. This generate, inspect, and refine cycle can be quicker and more customizable than a table plugin or the editor’s Table feature. section 1.5.14
HTML and CSS work together: HTML identifies the elements, and CSS can refine their color, typeface, spacing, and other visual properties. JavaScript adds behavior, such as showing extra information when someone clicks a button. If generated code does nothing when clicked, test it and ask for a correction rather than assuming the first version works. section 3.5.3 section 5.10.2
<html>
<head>
<style>
#paintingInfo {
display: none;
}
</style>
</head>
<body>
<button id="moreInfoBtn">More information...</button>
<div id="paintingInfo">
<form>
<p>
This painting is 60 x 80 inches
and weighs 6 pounds. It is for sale at $4,000.
You can contact FbreahaXX@hotmail.com for
additional details and purchase instructions.
</p>
</form>
</div>
<script>
document.getElementById('moreInfoBtn')
.addEventListener('click', function() {
document.getElementById('paintingInfo')
.style.display = 'block';
});
</script>
</body>
</html>
This example combines an HTML button and information block with CSS that initially hides the block and JavaScript that reveals it on a click. section 5.10.2
To see how an existing page is put together, right-click it and choose Inspect. Select an HTML element in the Inspector’s left pane; the right pane shows its associated CSS, including styles that have been overridden. For a ready-made embed, such as a YouTube video player, paste the supplied HTML into a page’s Text tab, save the page, and view it to check the result. section 7.3 section 8.3.3











