AppCode brings powerful support for HTML that includes syntax and error highlighting, formatting according to the code style, structure validation, code completion, on-the-fly preview during a debugging session (Live Edit), and much more.
Creating an HTML file
From the main menu, select HTML File from the list., and then select
Creating references in an HTML file
<img> tag, AppCode suggests completion for the path to the file you are referencing.
<img> tags inside
<img> tags, AppCode also generates the
For most HTML tags and attributes AppCode can show you a summary from the corresponding MDN article. This summary is displayed in the Documentation popup which also shows the deprecation status of a tag or an attribute and information on its compatibility with various browsers.
To view documentation for a tag or an attribute at caret
Press F1 or select Documentation popup with a brief description of the tag or the attribute.from the main menu. AppCode opens a
If the tag or the attribute is available in all versions of browsers, AppCode does not show any information about its compatibility.
Otherwise, the Documentation popup also lists the browsers and their versions that support the tag or the attribute.
If the tag or the attribute is deprecated, the popup also informs you about this status.
To open the MDN documentation for a tag or an attribute in the browser
In the Documentation popup F1, click the link at the bottom.
Press ⇧F1 or selectfrom the main menu.
Previewing output of an HTML file in a browser
Select AppCode default browser, select Default.from the main menu and then select the desired browser from the list. To open the
Alternatively, hover your mouse pointer over the code to show the browser icons bar, and click the icon that indicates the desired browser:
If you have only one browser configured, just press ⌥F2.
Viewing HTML source code of a web page in the editor
In the Open URL dialog that opens, type the URL address of the web page or choose a previously opened URL from the list.
Viewing embedded images
Check and configure the appearance of the preview on the Images page.
To view an image in AppCode
Select the image file in the Project tool window and press ⌘↓.
Alternatively, position the caret at the reference to the image in the editor and press ⌘B
To preview an image in a popup instead of in a separate tab, select the reference to it and press ⌥Space
To view an image in an external editor
Configure the path to the external editor on the Images page ( for macOS).
Select the image file in the Project tool window, and choose or press ⌥⌘F4.
Extracting an include file
<script> tags can be extracted as well. AppCode also suggests adding references instead of duplicates of the selected fragment.
In the editor, select the code block to be extracted and choosefrom the main menu or from the context menu of the selection.
In the Extract Include File dialog that opens, specify the name of the include file without the extension and the directory to store it in. You can accept the predefined directory or select another one.
Click OK, when ready. AppCode extracts the selected source code into the specified file in the target directory and generates the corresponding reference in the source file.
Configuring syntax highlighting
You can configure HTML-aware syntax highlighting according to your preferences and habits.
Select the color scheme, accept the highlighting settings inherited from defaults or customize them as described in Configuring Colors and Fonts.